/* カスタマイズ用CSS */

/* ヘルプページ（利用規約・プライバシーポリシー・当サイトについて）共通 */
.help-content {
    line-height: 1.9 !important;
    color: #333;
}
.help-content p,
.help-content ul,
.help-content ol,
.help-content li {
    line-height: 1.9 !important;
}
.help-content p {
    margin-bottom: 1.2em !important;
}
.help-content h2 {
    font-size: 1.1rem !important;
    font-weight: bold !important;
    margin-top: 2.5em !important;
    margin-bottom: 0.75em !important;
    padding-bottom: 0.4em !important;
    border-bottom: 2px solid #e0e0e0 !important;
}
.help-content h3 {
    font-size: 1rem !important;
    font-weight: bold !important;
    margin-top: 1.75em !important;
    margin-bottom: 0.5em !important;
}
.help-content ul,
.help-content ol {
    padding-left: 1.6em !important;
    margin-bottom: 1.2em !important;
}
.help-content li {
    margin-bottom: 0.5em !important;
}
.help-content table {
    font-size: 0.9rem;
}
.help-content table th,
.help-content table td {
    line-height: 1.6 !important;
    vertical-align: middle !important;
}
.ec-headerTitle__title img { max-height: 200px; width: auto; max-width: 100%; display: block; }
@media (max-height: 600px) {
    .ec-headerTitle__title img { max-height: 80px; }
}
.ec-itemNav__nav.customize-categoryNav__nav { margin-bottom: 40px; }

/* ec-roleと同じ幅制限をヘッダーにも適用 */
.ec-layoutRole__header {
    width: 100%;
    max-width: 1130px;
    margin: 0 auto;
}

/* ロゴリンクのmargin-bottom不要 */
.ec-headerTitle .ec-headerTitle__title a {
    margin-bottom: 0;
}

/* ヘッダー：ロゴ左・検索＋ナビ右の横並びレイアウト */
@media only screen and (min-width: 768px) {
    /* ec-header-top: ロゴとナビエリアを横並びに */
    .ec-header-top {
        display: flex;
        align-items: center;
    }
    /* ロゴ：左側・幅auto・margin/paddingなし */
    .ec-headerRole {
        order: 1;
        width: auto;
        flex-shrink: 0;
        margin: 0;
        padding: 0;
    }
    /* 検索＋ナビ：右側（縦2段）・残り幅を使用・margin/paddingなし */
    .ec-headerNaviRole {
        order: 2;
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        margin: 0;
        padding: 0;
        gap: 8px;
    }
    /* 各段：幅100% */
    .ec-headerNaviRole .ec-headerNaviRole__left {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
    .ec-headerNaviRole .ec-headerNaviRole__right {
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
    }
    /* 検索フォーム：margin-top不要・右寄せ */
    .ec-headerNaviRole .ec-headerNaviRole__search {
        margin-top: 0;
        margin-left: auto;
    }
    /* ナビリンク（新規会員登録・お気に入り・ログイン）：横並び */
    .ec-headerNav {
        display: flex;
        flex-direction: row;
        align-items: center;
        margin: 0;
        padding: 0;
        list-style: none;
    }
    /* カテゴリナビ：全幅で下段 */
    .ec-categoryNaviRole,
    .customize-categoryNavRole {
        width: 100%;
    }
}

/* トップページ カテゴリブロック */
.ec-categoryRole {
    margin-top: 40px;
}
.ec-categoryRole .ec-categoryRole__list + .ec-secHeading {
    margin-top: 40px;
}
.ec-categoryRole .ec-categoryRole__list {
    flex-wrap: wrap !important;
    gap: 16px;
}
.ec-categoryRole .ec-categoryRole__listItem,
.ec-categoryRole .ec-categoryRole__listItem:not(:last-of-type) {
    width: calc(33.333% - 11px) !important;
    margin-right: 0 !important;
    margin-bottom: 0;
}
.customize-categoryRole__banner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 150px;
    background: #f0f0f0;
    color: #525263;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    transition: background 0.2s, color 0.2s;
}
.ec-categoryRole__listItem a:hover .customize-categoryRole__banner {
    background: #525263;
    color: #fff;
}
.ec-categoryRole__listItem a {
    text-decoration: none;
}
@media (max-width: 767px) {
    .ec-categoryRole .ec-categoryRole__list {
        gap: 10px;
    }
    .ec-categoryRole .ec-categoryRole__listItem,
    .ec-categoryRole .ec-categoryRole__listItem:not(:last-of-type) {
        width: calc(50% - 5px) !important;
    }
    .customize-categoryRole__banner {
        height: 90px;
        font-size: 13px;
    }
}

/* フォント */
body {
    font-family: 'Noto Sans JP', sans-serif;
}

/* キーカラー #57B88F（EC-CUBE標準 #5CB1B1 を上書き） */
.ec-inlineBtn--primary,
.ec-inlineBtn--primary:disabled,
.ec-inlineBtn--primary.disabled {
    background-color: #57B88F;
    border-color: #57B88F;
}
.ec-inlineBtn--primary:hover,
.btn-check:focus + .ec-inlineBtn--primary,
.ec-inlineBtn--primary:focus {
    background-color: #4AA07E;
    border-color: #4AA07E;
}
.ec-blockBtn--primary,
.ec-blockBtn--primary:disabled,
.ec-blockBtn--primary.disabled {
    background-color: #57B88F;
    border-color: #57B88F;
}
.ec-blockBtn--primary:hover,
.btn-check:focus + .ec-blockBtn--primary,
.ec-blockBtn--primary:focus {
    background-color: #4AA07E;
    border-color: #4AA07E;
}
.ec-progress .is-complete .ec-progress__number {
    background: #57B88F;
}
.ec-progress .is-complete .ec-progress__label,
.ec-calendar .ec-calendar__sat {
    color: #57B88F;
}
.ec-inlineBtn--action,
.ec-inlineBtn--action:disabled,
.ec-inlineBtn--action.disabled {
    background-color: #57B88F;
    border-color: #57B88F;
}
.ec-inlineBtn--action:hover,
.btn-check:focus + .ec-inlineBtn--action,
.ec-inlineBtn--action:focus {
    background-color: #4AA07E;
    border-color: #4AA07E;
}
.ec-blockBtn--action,
.ec-blockBtn--action:disabled,
.ec-blockBtn--action.disabled {
    background-color: #57B88F;
    border-color: #57B88F;
}

/* ========================================
   ボタン共通スタイル
   ======================================== */
.ec-blockBtn--action,
.ec-blockBtn--primary,
.ec-blockBtn--top,
.ec-blockBtn--cancel {
    border-radius: 8px !important;
    height: 56px !important;
    color: #FFF !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 600 !important;
    line-height: 56px !important;
    letter-spacing: 2.56px !important;
    text-align: center !important;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s !important;
}
.ec-blockBtn--action,
.ec-blockBtn--primary,
.ec-blockBtn--top {
    background-color: #57B88F !important;
    border: 1px solid #57B88F !important;
}
.ec-blockBtn--cancel {
    background-color: #525263 !important;
    border: 1px solid #525263 !important;
}
.ec-blockBtn--action:hover,
.ec-blockBtn--primary:hover,
.ec-blockBtn--top:hover {
    background-color: #fff !important;
    border-color: #57B88F !important;
    color: #57B88F !important;
}
.ec-blockBtn--cancel:hover {
    background-color: #fff !important;
    border-color: #525263 !important;
    color: #525263 !important;
}
.ec-blockBtn--action:disabled,
.ec-blockBtn--action.disabled,
.ec-blockBtn--primary:disabled,
.ec-blockBtn--primary.disabled,
.ec-blockBtn--top:disabled,
.ec-blockBtn--top.disabled {
    background-color: #57B88F !important;
    border-color: #57B88F !important;
    color: #fff !important;
    opacity: 0.65 !important;
}
.ec-blockBtn--cancel:disabled,
.ec-blockBtn--cancel.disabled {
    background-color: #525263 !important;
    border-color: #525263 !important;
    color: #fff !important;
    opacity: 0.65 !important;
}

/* クリック時フォーカスリング除去（マウス操作のみ・キーボード操作では残す） */
.ec-blockBtn--action:focus:not(:focus-visible),
.ec-blockBtn--primary:focus:not(:focus-visible),
.ec-blockBtn--top:focus:not(:focus-visible),
.ec-blockBtn--cancel:focus:not(:focus-visible),
.ec-inlineBtn--action:focus:not(:focus-visible),
.ec-inlineBtn--primary:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}

/* 商品一覧・取り付け可能パーツのカートボタンは小さく */
.ec-shelfGrid__item .ec-blockBtn--action,
.related-part-cart-btn.ec-blockBtn--action {
    height: 40px !important;
    line-height: 40px !important;
    font-size: 13px !important;
    letter-spacing: 1px !important;
}
@media (max-width: 767px) {
    .related-part-cart-btn.ec-blockBtn--action {
        font-size: 11px !important;
        letter-spacing: 0.5px !important;
    }
}

/* ========================================
   チェックボックス カスタムデザイン
   ======================================== */
.ec-checkbox input[type="checkbox"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    border: 2px solid #ccc !important;
    border-radius: 0 !important;
    background-color: #fff !important;
    cursor: pointer !important;
    position: relative !important;
    vertical-align: middle !important;
    display: inline-block !important;
    padding: 0 !important;
    margin-right: 6px !important;
    margin-bottom: 2px !important;
    margin-top: 0 !important;
    transition: border-color 0.15s, background-color 0.15s !important;
    flex-shrink: 0 !important;
}
.ec-checkbox input[type="checkbox"]:checked {
    background-color: #57B88F !important;
    border-color: #57B88F !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3 9 l4 4 l8-8'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 14px 14px !important;
}
.ec-checkbox input[type="checkbox"]:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}
.ec-checkbox input[type="checkbox"]:focus-visible {
    outline: 2px solid #57B88F;
    outline-offset: 2px;
}
.ec-checkbox label {
    display: flex !important;
    align-items: center !important;
    cursor: pointer;
    font-weight: normal !important;
    margin-bottom: 0 !important;
}
.ec-checkbox input[type="checkbox"]:disabled {
    opacity: 0.7 !important;
    cursor: default !important;
}
.ec-checkbox input[type="checkbox"]:disabled:checked {
    background-color: #57B88F !important;
    border-color: #57B88F !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3 9 l4 4 l8-8'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 14px 14px !important;
}

/* ========================================
   商品一覧 カードデザイン
   ======================================== */

/* カード全体 */
.ec-shelfGrid__item {
    display: flex;
    flex-direction: column;
}

/* 商品リンク（画像・名前・価格） */
.ec-shelfGrid__item > a {
    flex: 1;
    text-decoration: none;
    color: inherit;
}

/* 商品名（画像p の次のp = nth-child(2)） */
.ec-shelfGrid__item > a > p:nth-child(2) {
    font-size: 0.85rem;
    font-weight: 500;
    color: #222 !important;
    line-height: 1.5;
    margin-top: 10px;
    margin-bottom: 4px;
}

/* 商品説明文（description_listあり時のみ nth-child(3)、ただし price02-default は除外） */
.ec-shelfGrid__item > a > p:not(.ec-shelfGrid__item-image):not(.price02-default):nth-child(n+3) {
    font-size: 0.78rem;
    color: #666 !important;
    line-height: 1.4;
    margin-bottom: 4px;
}

/* 価格 */
.ec-shelfGrid__item .price02-default {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #c0392b !important;
    margin-top: 6px !important;
    margin-bottom: 0 !important;
}
/* （税込）テキスト */
.ec-shelfGrid__item .price02-default .ec-price__tax,
.ec-shelfGrid__item .price02-default small,
.ec-shelfGrid__item .price02-default span {
    color: #c0392b !important;
}

/* アクションエリア（規格・数量） */
.ec-shelfGrid__item .ec-productRole__actions {
    padding: 4px 0 2px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* 規格ラベル＋セレクト */
.ec-shelfGrid__item .ec-select {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.ec-shelfGrid__item .ec-select label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0;
}
.ec-shelfGrid__item .ec-select select {
    width: 100%;
    height: 38px;
    padding: 0 32px 0 10px;
    font-size: 0.85rem;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23555' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    cursor: pointer;
    transition: border-color 0.15s;
}
.ec-shelfGrid__item .ec-select select:focus {
    outline: none;
    border-color: #57B88F;
    box-shadow: 0 0 0 2px rgba(87,184,143,0.2);
}

/* 数量エリア */
.ec-shelfGrid__item .ec-numberInput {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ec-shelfGrid__item .ec-numberInput span {
    font-size: 0.78rem;
    color: #555;
    white-space: nowrap;
    flex-shrink: 0;
}
.ec-shelfGrid__item .ec-numberInput input[type="number"],
.ec-shelfGrid__item .ec-numberInput input.quantity {
    width: 64px !important;
    height: 38px !important;
    padding: 0 8px !important;
    font-size: 0.9rem !important;
    text-align: center !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    display: inline-block !important;
}
.ec-shelfGrid__item .ec-numberInput input[type="number"]:focus,
.ec-shelfGrid__item .ec-numberInput input.quantity:focus {
    outline: none !important;
    border-color: #57B88F !important;
    box-shadow: 0 0 0 2px rgba(87,184,143,0.2) !important;
}

/* カートボタンエリア */
.ec-shelfGrid__item .ec-productRole__btn {
    margin-top: 5px;
}
