/* 商品一覧・特集・関連商品ブロック共通（list.twig / Feature/detail.twig / related_product_block.twig） */

/* カテゴリコンテンツ（アイキャッチ・導入テキスト・特集リンク） */
.category-content {
    margin-bottom: 24px;
}
@media only screen and (max-width: 767px) {
    .category-content {
        margin-left: 20px;
        margin-right: 20px;
    }
}
.category-content__image {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 16px;
}
.category-content__description {
    white-space: pre-line;
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 16px;
}
.feature-child-categories {
    margin-bottom: 20px;
}
.feature-child-categories__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    align-items: center;
}
.feature-child-categories__list li {
    margin: 0;
}
.feature-child-categories__list a {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #337ab7;
    text-decoration: none;
    background: #fafafa;
    transition: background 0.15s, border-color 0.15s;
}
.feature-child-categories__list a:hover {
    background: #f0f7ff;
    border-color: #bcd;
    text-decoration: underline;
}
.category-features-accordion {
    margin-bottom: 20px;
}
.category-features-accordion__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
}
.category-features-accordion__toggle:hover {
    background: #eee;
}
.category-features-accordion__toggle .toggle-icon {
    transition: transform 0.3s;
    font-size: 12px;
}
.category-features-accordion__toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}
.category-features-accordion__body {
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    padding: 0;
}
.category-features-accordion__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.category-features-accordion__list li {
    border-bottom: 1px solid #eee;
}
.category-features-accordion__list li:last-child {
    border-bottom: none;
}
.category-features-accordion__list li a {
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    color: #337ab7;
    font-size: 14px;
    transition: background 0.15s;
}
.category-features-accordion__list li a:hover {
    background: #f9f9f9;
    text-decoration: underline;
}

/* 商品一覧カード（品番・単価/箱・カートン・説明文） */
.ec-shelfRole .product-list-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.ec-shelfRole .product-list-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
    min-height: 0;
}
.ec-shelfRole .product-list-card__image-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
}
.ec-shelfRole .product-list-card__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
/* 完売：画像を暗くオーバーレイし、中央に赤文字で「完売」を表示 */
.ec-shelfRole .product-list-card__image-wrap--soldout::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    pointer-events: none;
}
.ec-shelfRole .product-list-card__image-wrap--soldout::after {
    content: '完売';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #DE5D50;
    font-weight: 900;
    font-size: 32px;
    letter-spacing: 0.2em;
    text-shadow: 0 0 4px #fff, 0 0 4px #fff;
    z-index: 2;
    pointer-events: none;
}
.ec-shelfRole .product-list-card__body {
    padding: 12px 14px 8px;
    display: flex;
    flex-direction: column;
}
.ec-shelfRole .product-list-card__code {
    font-size: 12px;
    color: #555;
    margin: 0 0 4px 0;
}
.ec-shelfRole .product-list-card__name {
    font-size: 15px;
    font-weight: bold;
    margin: 0 0 8px 0;
    line-height: 1.35;
}
.ec-shelfRole .product-list-card__price-block {
    margin-bottom: 6px;
}
.product-list-card__description-outer {
    margin-top: 10px;
    padding: 0 14px 12px;
}
.ec-shelfRole .product-list-card__description {
    padding: 10px 12px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.45;
    color: #333;
}
.ec-shelfRole .product-list-card__description-outer--accordion .js-product-desc-accordion {
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.ec-shelfRole .product-list-card__description p {
    margin: 0;
}
.ec-shelfRole .product-list-card__description-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 6px;
    padding: 8px 10px;
    background: #e8e8e8;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
}
.ec-shelfRole .product-list-card__description-toggle:hover {
    background: #dedede;
}
.ec-shelfRole .product-list-card__description-toggle .toggle-icon {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 10px;
}
.ec-shelfRole .product-list-card__description-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}
.ec-shelfRole .product-list-card__description-toggle-label--collapse {
    display: none;
}
.ec-shelfRole .product-list-card__description-toggle[aria-expanded="true"] .product-list-card__description-toggle-label--expand {
    display: none;
}
.ec-shelfRole .product-list-card__description-toggle[aria-expanded="true"] .product-list-card__description-toggle-label--collapse {
    display: inline;
}
/* 欠品・完売ラベル */
.ec-shelfRole .product-list-card__status-label,
.product-status-label {
    color: #DE5D50;
    font-weight: bold;
    font-size: inherit;
}

/* 商品一覧・特集：件数とページ表示 */
.product-list-counter__total {
    margin: 0;
}
.product-list-counter__page {
    margin: 6px 0 0;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.4;
}

/* 商品一覧：完売表示トoggle（表示件数・並び順の横） */
.ec-searchnavRole .ec-searchnavRole__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px 16px;
}
.ec-searchnavRole .ec-searchnavRole__actions > .ec-select {
    margin-bottom: 0;
}
.ec-searchnavRole .ec-searchnavRole__actions > .ec-select select + select {
    margin-left: 10px;
}
.product-list-include-soldout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.42857142;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
}
@media only screen and (min-width: 768px) {
    .product-list-include-soldout {
        font-size: 0.875rem;
    }
}
.product-list-include-soldout input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
}
.product-list-include-soldout .form-check {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    min-height: 0;
}
.product-list-include-soldout .form-check .form-check-input {
    float: none;
    margin: 0;
}
.product-list-include-soldout__text {
    line-height: 1.42857142;
}

/* お気に入り：トップ商品カード（ec-topProductCard）と同じ表記・デザイン */
.ec-favoriteRole .ec-favoriteRole__item .ec-closeBtn--circle {
    z-index: 10;
}
.ec-favoriteRole__item .ec-favoriteRole__productCard {
    height: auto;
}
.ec-favoriteRole .ec-topProductCard__status {
    color: #DE5D50;
}
.ec-favoriteRole .ec-topProductCard__img {
    width: 100%;
    height: 100%;
    max-height: none;
}
.ec-favoriteRole .ec-topProductCard__link {
    text-decoration: none;
    color: inherit;
}

/* 特集ページ：プルダウン行＋完売チェック行（2段・右寄せ） */
.ec-searchnavRole .ec-searchnavRole__actions.ec-searchnavRole__actions--feature {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    width: 100%;
    text-align: right;
    flex-wrap: nowrap;
    justify-content: flex-start;
}
@media only screen and (min-width: 768px) {
    .ec-searchnavRole .ec-searchnavRole__actions.ec-searchnavRole__actions--feature {
        width: 50%;
    }
}
.ec-searchnavRole .ec-searchnavRole__actions.ec-searchnavRole__actions--feature > .ec-select {
    margin-bottom: 0;
}
.ec-searchnavRole .ec-searchnavRole__actions.ec-searchnavRole__actions--feature .feature-category-select {
    max-width: 11em;
}
.ec-searchnavRole .ec-searchnavRole__actions.ec-searchnavRole__actions--feature > .product-list-include-soldout {
    margin: 0;
}

/* sticky の親（パンくず＋商品棚）。searchnav 内に置くと棚到達で外れる */
.ec-productListStickyScope {
    overflow: visible;
}

/* 検索条件（パンくず＋カテゴリー絞り込み）：メニューバー直下に追従
   --site-header-height は customize.js でヘッダー＋メニューバー高さを設定 */
.ec-searchnavRole__topicpathWrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 16px;
    padding-top: 10px;
    padding-bottom: 10px;
    position: sticky;
    top: var(--site-header-height, 80px);
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.9);
    /* ヘッダー(3)・メニューバー(2) より下 */
    box-sizing: border-box;
}
/* searchnav 外に出したため、PC は searchnav と同じ横幅・左右余白を付与 */
@media only screen and (min-width: 768px) {
    .ec-productListStickyScope > .ec-searchnavRole__topicpathWrap {
        width: 100%;
        max-width: 1130px;
        margin-left: auto;
        margin-right: auto;
        padding: 30px 20px 10px;
    }
}
@media only screen and (max-width: 767px) {
    /* 改行時もボタンが画面左端に張り付かないよう、トピックパスと共通の左右余白を確保 */
    .ec-searchnavRole__topicpathWrap {
        padding-left: 20px;
        padding-right: 20px;
    }
    .ec-searchnavRole__topicpathWrap .ec-topicpath {
        padding-left: 0;
        padding-right: 0;
    }
}
.ec-searchnavRole__topicpathWrap .ec-searchnavRole__topicpath {
    margin-bottom: 0;
    flex: 1 1 auto;
    min-width: 0;
}
.ec-searchnavRole__topicpathWrap .ec-topicpath {
    padding-top: 0;
    padding-bottom: 0;
}
.ec-priceCategoryRefine {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    flex: 0 0 auto;
}
/* SP: トピックパス（12px）に合わせた小さめボタン / PC: select.order-by と同寸（34px） */
.ec-priceCategoryRefine__open {
    box-sizing: border-box;
    display: inline-block;
    height: auto;
    padding: 2px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #f5f5f5;
    color: #525263;
    font-size: 12px;
    font-weight: normal;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
}
.ec-priceCategoryRefine__open:hover,
.ec-priceCategoryRefine__open:focus {
    background-color: #eee;
    border-color: #bbb;
    outline: none;
}
@media only screen and (min-width: 768px) {
    .ec-priceCategoryRefine__open {
        height: 34px;
        padding: 6px 12px;
        font-size: 0.875rem;
        line-height: 20px;
    }
}
.ec-priceCategoryRefine__current {
    font-size: 12px;
    color: #333;
    max-width: 12em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ec-priceCategoryRefine__clearInline {
    font-size: 12px;
    color: #337ab7;
    text-decoration: none;
    white-space: nowrap;
}
.ec-priceCategoryRefine__clearInline:hover {
    text-decoration: underline;
}
.ec-priceCategoryRefine__clear {
    font-size: 12px;
    color: #337ab7;
    text-decoration: none;
}
.ec-priceCategoryRefine__clear:hover {
    text-decoration: underline;
}

.ec-priceCategoryModal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.ec-priceCategoryModal.is-open {
    display: flex;
}
.ec-priceCategoryModal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}
.ec-priceCategoryModal__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 480px;
    max-height: min(80vh, 640px);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}
.ec-priceCategoryModal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    flex: 0 0 auto;
}
.ec-priceCategoryModal__title {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}
.ec-priceCategoryModal__headerActions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}
.ec-priceCategoryModal__close {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: #666;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.ec-priceCategoryModal__close:hover {
    color: #333;
}
.ec-priceCategoryModal__body {
    flex: 1 1 auto;
    overflow: auto;
    padding: 8px 16px 16px;
    -webkit-overflow-scrolling: touch;
}
.ec-priceCategoryRefine__nav {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ec-priceCategoryRefine__nav > .ec-priceCategoryRefine__item + .ec-priceCategoryRefine__item {
    border-top: 1px dotted #ff8000;
}
.ec-priceCategoryRefine__item {
    margin: 0;
}
.ec-priceCategoryRefine__row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
}
.ec-priceCategoryRefine__link {
    flex: 1 1 auto;
    padding: 8px 0;
    color: #000;
    font-size: 13px;
    text-decoration: none;
    word-break: break-word;
}
.ec-priceCategoryRefine__link:hover,
.ec-priceCategoryRefine__link:focus {
    color: #ff8000;
    text-decoration: none;
}
.ec-priceCategoryRefine__link.is-current {
    color: #ff8000;
    font-weight: bold;
}
.ec-priceCategoryRefine__toggle {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: #666;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
}
.ec-priceCategoryRefine__toggleIcon {
    display: inline-block;
    transition: transform 0.2s ease;
}
.ec-priceCategoryRefine__toggle.is-open .ec-priceCategoryRefine__toggleIcon {
    transform: rotate(45deg);
}
.ec-priceCategoryRefine__children {
    list-style: none;
    display: none;
    margin: 0;
    padding: 0 0 0 16px;
    background: #fafafa;
}
.ec-priceCategoryRefine__children.is-open {
    display: block;
}
.ec-priceCategoryRefine__children .ec-priceCategoryRefine__link {
    font-size: 12px;
}
.ec-priceCategoryRefine__children .ec-priceCategoryRefine__item:not(:last-child) {
    border-bottom: 1px solid #eee;
}

/* 特集ページ専用 */
.feature-category-topicpath {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}
.feature-category-topicpath a {
    color: #337ab7;
    text-decoration: none;
}
.feature-category-topicpath a:hover {
    text-decoration: underline;
}
