/* 商品一覧ページ サイドバー付きレイアウト用CSS */

/* メインコンテナ */
.ec-productListContainer {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

/* サイドバー */
.ec-productListSidebar {
    width: 250px;
    flex-shrink: 0;
}

/* メインコンテンツエリア */
.ec-productListMain {
    flex: 1;
    min-width: 0;
}

/* サイドバーなしレイアウト */
.ec-productListContainer--noSidebar {
    justify-content: center;
    background: #fff;
}

.ec-productListContainer--noSidebar .ec-productListMain {
    max-width: 1200px;
}

/* タイヤフィルター（サイドバー用） */
.ec-tireFilter {
    margin: 30px 0;
    padding: 20px 20px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ec-tireFilter__title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 20px 0;
    color: #333;
    border-bottom: 1px solid #ccc;
    padding-bottom: 8px;
}

.ec-tireFilter__section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.ec-tireFilter__section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.ec-tireFilter__label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
}

/* ラジオボタングループ */
.ec-tireFilter__radioGroup {
    display: flex;
    gap: 15px;
}

.ec-tireFilter__radioItem {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.ec-tireFilter__radioItem input[type="radio"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.ec-tireFilter__radioLabel {
    font-size: 14px;
    color: #333;
}

/* セレクトボックス */
.ec-tireFilter__select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    color: #333;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.ec-tireFilter__select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* セクションヘッダー（トグル付き） */
.ec-tireFilter__sectionHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    user-select: none;
}

.ec-tireFilter__sectionHeader:hover {
    background-color: #f0f8ff;
}

.ec-tireFilter__toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
    font-size: 12px;
    pointer-events: none; /* セクションヘッダーのクリックを優先 */
}

.ec-tireFilter__toggle:hover {
    color: #007bff;
}

.ec-tireFilter__toggleIcon {
    transition: transform 0.3s ease;
}

/* デフォルトでPCは上向き矢印（::afterのみ使用） */
.ec-tireFilter__toggleIcon::after {
    content: '▲';
}

/* 開いた状態の矢印 */
.ec-tireFilter__toggleIcon.open::after {
    content: '▲';
}

/* 閉じた状態の矢印 */
.ec-tireFilter__toggleIcon.closed::after {
    content: '▼';
}

/* オプション選択エリア */
.ec-tireFilter__options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}

/* スマホでアコーディオンをデフォルトで閉じる */
@media (max-width: 768px) {
    .ec-tireFilter__options {
        display: none !important;
    }
    
    /* 開いた時の表示 */
    .ec-tireFilter__options.show {
        display: flex !important;
        flex-wrap: wrap;
    }
    
    .ec-tireFilter__toggleIcon::after {
        content: '▼' !important;
    }
    
    .ec-tireFilter__toggleIcon.open::after {
        content: '▲' !important;
    }
    
    .ec-tireFilter__toggleIcon.closed::after {
        content: '▼' !important;
    }
}

.ec-tireFilter__optionItem {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    padding: 8px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.ec-tireFilter__optionItem:hover {
    border-color: #007bff;
    background-color: #f0f8ff;
}

.ec-tireFilter__optionItem input[type="checkbox"] {
    margin-right: 6px;
    transform: scale(0.9);
}

.ec-tireFilter__optionItem input[type="checkbox"]:checked + .ec-tireFilter__optionLabel {
    color: #007bff;
    font-weight: bold;
}

.ec-tireFilter__optionLabel {
    font-size: 13px;
    color: #333;
    flex: 1;
    text-align: center;
}

/* 商品グリッドの調整（4列レイアウト） */
.ec-productListMain .ec-shelfGrid__item {
    width: calc(25% - 12px);
    margin-right: 12px;
    margin-bottom: 30px;
}

.ec-productListMain .ec-shelfGrid__item:nth-child(4n) {
    margin-right: 0;
}

.ec-productListMain .ec-shelfGrid__item:nth-child(odd),
.ec-productListMain .ec-shelfGrid__item:nth-child(even) {
    /* border: 1px solid #E2E0E0;
    border-radius: 8px; */
    padding: 10px;
}

.ec-shelfGrid__item{
    transition: all 0.3s ease;

}

.ec-shelfGrid__item:hover{
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.ec-topicpath {
    border-top: none;
}
.ec-topicpath .ec-topicpath__item--active a{
    color: #8f7a37;
    font-weight: normal;
}
.ec-shelfGrid .ec-shelfGrid__item img{
    max-height: 100%;
    height: auto;
    width: auto;
    object-fit: contain; /* 比率保持＋枠内に収める */
    flex-shrink: 0;
}
.ec-shelfGrid .ec-shelfGrid__item-image{
    height: 200px;
    width: auto; /* 幅は自動調整 or 固定したい場合は指定 */
    display: flex;
    align-items: center;   /* ← 画像を上下中央に配置 */
    justify-content: center;
}
.product-name{
    display: -webkit-box;
    -webkit-line-clamp: 2;      /* 2行まで表示 */
    -webkit-box-orient: vertical;
    overflow: hidden;           /* はみ出した部分を非表示 */
    text-overflow: ellipsis;    /* 省略記号 (…) を表示 */
    line-height: 1.4;           /* 行間調整 */
    height: 2.8em;              /* 2行分の固定高さ (line-height × 2) */
    margin-bottom: 10px;        /* 下部マージンを確保 */
}
.ec-shelfGrid a{
    display: flex;
    flex-direction: column;
}
a.ec-blockBtn--action.mitumori {
    color: #fff;
}
.ec-numberInput input{
    margin-bottom:10px;
}
.ec-numberInput{
    text-align: left;
}
.price02-default{
    color:#DE5D50 ;
    text-align: right;
    display: flex;
    flex-direction: row; /* 横並びに変更 */
    justify-content: flex-start; /* 右寄せ */
    align-items: baseline; /* ベースライン揃え */
    margin-top: auto; /* 上のマージンを自動調整して下に配置 */
    padding: 0 0 10px 0;
    font-size: 18px;
    font-weight: bold;
}

.price02-default .tax-label {
    font-weight: normal;
    margin-right: 5px; /* 価格との間隔 */
    font-size:16px ;
}
.price02-defaul{
    display: inline;
}
.ec-select{
    text-align: left;
}
.ec-select select{
    width: 80%;
}
.ec-select.top select {
    width: auto;
}

/* レスポンシブ対応 */
@media (max-width: 992px) {
    .ec-productListContainer {
        flex-direction: column;
    }
    
    .ec-productListSidebar {
        width: 100%;
        order: -1;
    }
    
    .ec-tireFilter__radioGroup {
        flex-direction: row;
        gap: 10px;
    }
    
    .ec-tireFilter__options {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .ec-productListMain .ec-shelfGrid__item {
        width: calc(50% - 8px);
        margin-right: 8px;
    }
    
    .ec-productListMain .ec-shelfGrid__item:nth-child(4n) {
        margin-right: 8px;
    }
    
    .ec-productListMain .ec-shelfGrid__item:nth-child(2n) {
        margin-right: 0;
    }
}

@media (max-width: 576px) {
    .ec-productListContainer {
        padding: 5px;
    }
    
    .ec-tireFilter {
        padding: 8px;
        margin: 10px 0;
    }
    
    .ec-tireFilter__title {
        font-size: 14px;
        margin: 0 0 8px 0;
        padding-bottom: 3px;
    }
    
    .ec-tireFilter__section {
        margin-bottom: 6px;
        padding-bottom: 4px;
    }
    
    .ec-tireFilter__section:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .ec-tireFilter__sectionHeader {
        padding: 3px 5px;
        margin-bottom: 3px;
        min-height: 28px;
        display: flex;
        align-items: center;
    }
    
    .ec-tireFilter__label {
        font-size: 12px;
        margin-bottom: 3px;
        font-weight: 600;
    }
    
    .ec-tireFilter__radioGroup {
        display: flex;
        flex-direction: row;
        gap: 4px;
        margin-top: 3px;
    }
    
    .ec-tireFilter__radioItem {
        margin-right: 0;
        flex: 0 0 auto;
        padding: 0 4px;
    }
    
    .ec-tireFilter__radioLabel {
        font-size: 12px;
    }
    
    .ec-tireFilter__options {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 5px;
    }
    
    .ec-tireFilter__optionItem {
        padding: 6px 8px;
        min-height: 32px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        border-radius: 6px;
    }
    
    .ec-tireFilter__optionLabel {
        font-size: 11px;
        text-align: center;
        white-space: nowrap;
    }
    
    .ec-productListMain .ec-shelfGrid__item {
        width: 100%;
        margin-right: 0;
    }
}

/* タブレット・スマホ共通のコンパクト化 */
@media (max-width: 768px) {
    .ec-tireFilter {
        padding: 10px;
        margin: 15px 0;
    }
    
    .ec-tireFilter__title {
        font-size: 15px;
        margin: 0 0 10px 0;
        padding-bottom: 4px;
    }
    
    .ec-tireFilter__section {
        margin-bottom: 8px;
        padding-bottom: 5px;
    }
    
    .ec-tireFilter__sectionHeader {
        padding: 4px 6px;
        margin-bottom: 4px;
        min-height: 32px;
        display: flex;
        align-items: center;
    }
    
    .ec-tireFilter__label {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .ec-tireFilter__radioGroup {
        margin-top: 4px;
        gap: 4px;
        flex-direction: row;
    }
    
    .ec-tireFilter__radioItem {
        margin-right: 0;
        flex: 0 0 auto;
        padding: 0 4px;
    }
}

/* ローディング表示 */
.loading {
    text-align: center;
    padding: 40px 0;
    color: #666;
    font-size: 16px;
}

.loading:before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 検索ナビゲーション調整 */
.ec-productListMain .ec-searchnavRole {
    margin-bottom: 20px;
}

/* ページャー調整 */
.ec-productListMain .ec-pagerRole {
    margin-top: 30px;
}

.ec-tireFilter--disabled {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.ec-tireFilter--disabled::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
    cursor: not-allowed;
}

.ec-tireFilter--disabled input,
.ec-tireFilter--disabled select {
    cursor: not-allowed !important;
}

.ec-tireFilter--disabled .ec-tireFilter__label {
    color: #999 !important;
}

.ec-tireFilter--disabled .ec-tireFilter__optionLabel {
    color: #999 !important;
}

/* 並び順セレクトボックスの無効化スタイル */
.order-by:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f5f5f5;
    color: #999;
}

/* 検索中テキストのスタイル */
.searching-text {
    font-weight: bold;
    color: #666;
}

/* 検索中メッセージのスタイル */
.ec-searchnavRole__counter span {
    font-weight: bold;
}

.ec-searchnavRole__counter span[style*="color: red"] {
    background-color: #ffe6e6;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ffcccc;
}

/* 検索中の商品リストスタイル */
.ec-shelfGrid li[style*="text-align: center"] {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 10px 0;
}

.ec-shelfGrid li[style*="color: red"] {
    background-color: #ffe6e6;
    border: 1px solid #ffcccc;
}

/* 1本/4本セット選択のスタイル */
.ec-tireFilter__radioGroup {
    margin-top: 8px;
}

.ec-tireFilter__radioItem {
    margin-right: 15px;
}
.bg-load-overlay {
    display: none;
}
@media (min-width: 767px){
    .ec-productListContainer--noSidebar{
        padding: 40px 80px;
    }
}
.ec-topicpath .ec-topicpath__item{
    font-size: 18px;
    font-weight: bold;
    color:#8f7a37 ;
}

/* 商品詳細モーダル用スタイル */
.ec-productDetailModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.ec-productDetailModal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ec-productDetailModal__content {
    background: white;
    border-radius: 12px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ec-productDetailModal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    z-index: 10;
    transition: all 0.2s ease;
}

.ec-productDetailModal__close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
}

.ec-productDetailModal__body {
    padding: 30px;
}

/* モーダル内の商品詳細レイアウト */
.ec-productDetailModal .ec-productRole {
    margin-left: auto;
    padding: 40px 0px;
    max-width: 1200px;
}

.ec-productDetailModal .ec-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.ec-productDetailModal .ec-sliderItemRole {
    width: 100%;
}

.ec-productDetailModal .item_visual {
    margin-bottom: 20px;
}

.ec-productDetailModal .slide-item img {
    width: 80%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.ec-productDetailModal .ec-productRole__profile {
    padding: 0;
}

.ec-productDetailModal .ec-productRole__title h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.ec-productDetailModal .ec-productRole__price {
    margin:0;
    text-align: left;
}

.ec-productDetailModal .ec-price__price {
    font-size: 28px;
    font-weight: bold;
    color: #DE5D50;
}

.ec-productDetailModal .ec-productRole__code {
    text-align: left;
    margin: 0;
}

.ec-productDetailModal .ec-productRole__category {
    text-align: left;
    margin: 0;
}

.ec-productDetailModal .ec-productRole__actions {
    margin: 0;
}

.ec-productDetailModal .ec-productRole__btn {
    text-align: left;
    width: 100%;
}

.ec-productDetailModal .ec-productRole__description {
    grid-column: 1 / -1;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* ローディング表示 */
.ec-productDetailModal__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    font-size: 16px;
    color: #666;
}

.ec-productDetailModal__loading::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .ec-productDetailModal {
        padding: 10px;
    }
    
    .ec-productDetailModal__content {
        max-height: 95vh;
        border-radius: 8px;
    }
    
    .ec-productDetailModal__body {
        padding: 20px;
    }
    
    .ec-productDetailModal .ec-grid2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .ec-productDetailModal .slide-item img {
        max-height: 300px;
    }
    
    .ec-productDetailModal .ec-productRole__title h2 {
        font-size: 20px;
    }
    
    .ec-productDetailModal .ec-price__price {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .ec-productDetailModal {
        padding: 5px;
    }
    
    .ec-productDetailModal__body {
        padding: 15px;
    }
    
    .ec-productDetailModal .ec-productRole__title h2 {
        font-size: 18px;
    }
    
    .ec-productDetailModal .ec-price__price {
        font-size: 22px;
    }
}