/* ==========================================================================
   1. レイアウト（全体・サイドバー）
   ========================================================================== */
.layout_with_sidebar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
    align-items: stretch;
}

.layout_with_sidebar .layout_sidebar {
    order: 1;
    flex: 0 0 355px;
    max-width: 355px;
}

.layout_with_sidebar .layout_rest {
    order: 2;
    flex: 1 1 calc(100% - 355px - min(3.2vw, 32px));
    min-width: 0;
    border-left: 1px solid #ccc;
}

.layout_sidebar .layout_sidebar_inner {
    box-sizing: border-box;
    position: sticky;
    top: 12px;

    height: calc(100vh - 12px);
    /* 中身がはみ出した場合のみ縦スクロールを許可 */
    overflow-y: auto;
}

/* ==========================================================================
   2. サイドバー内：検索エリア
   ========================================================================== */
.layout_sidebar_flex {
    display: flex;
    width: 95%;
    margin: 25px auto 0;
    border-bottom: 1px solid #b2b2b2;
    gap: 10px;
}

.layout_sidebar .btn_search {
    border: 1px solid #000;
    width: 50%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 25px 0;
    cursor: pointer;
    max-width: 160px;
    box-sizing: border-box;
    font-size: 13px;
}

.layout_sidebar .btn_search:hover {
    background-color: #c9c9c9;
}

/* ==========================================================================
   3. サイドバー内：新着アイテム見出し
   ========================================================================== */
.top_page .head.layout_sidebar_new_head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding-left: min(3vw, 16px);
    padding-right: min(3vw, 16px);
    box-sizing: border-box;
    background-color: transparent;
    letter-spacing: 0;
    margin: 0 auto 10px;
}

.layout_sidebar .layout_sidebar_new_head h2 {
    color: #000;
    margin: min(3vw, 18px) 0;
    flex: 1;
    text-align: left;
    font-size: 15px;
    padding: 0px 0px;
    font-weight: 500;
}

.layout_sidebar .layout_sidebar_new_all {
    color: #000;
    font-size: 12px;
    font-weight: 600;
    text-decoration: underline;
    white-space: nowrap;
}

.layout_sidebar .layout_sidebar_new_all:hover {
    opacity: 0.85;
}

/* ==========================================================================
   4. アイテムリスト（グリッド設定）
   ========================================================================== */
.layout_sidebar .top_page .list.top {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 12px 10px;
    overflow: visible !important;
    width: 92%;
    margin: 0 auto;
}

.layout_sidebar .top_page .list .item {
    width: auto;
    max-width: 100%;
    padding: 0;
    flex-shrink: 0;
}

/* ==========================================================================
   5. アイテム詳細：画像・タグ
   ========================================================================== */
.top_page .list .item .image {
    height: calc(((100vw / 3) - 30px));
    max-height: 150px;
    margin: 0 0 10px 0;
    overflow: hidden;
    position: relative;
    z-index: 0;
}

.top_page .list .item .image img {
    width: 100%;
    height: auto;
    text-align: center;
    display: block;
    transition: all 0.4s 0s;
    transform: translate(-50%, -50%);
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 0;
}

.top_page .list .item .image a:hover img {
    opacity: 0.6;
}

/* タグ・ステータス */
.top_page .list .item .image .tag_thumb {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    font-size: 13px;
}

.top_page .list .item .image .state {
    margin: 0 4px 4px 0;
    padding: 4px;
    line-height: 1.2em;
    font-size: 13px;
    background: #ffffff;
}

.top_page .list .item .image .state.new {
    color: #E7336B;
    border: 1px solid #E7336B;
}

.top_page .list .item .image .state.recycling {
    color: #0074C1;
    background: #ffffff;
    border: 1px solid #0074C1;
}

.top_page .list .item .image .state.secondhand {
    color: #00A73C;
    background: #ffffff;
    border: 1px solid #00A73C;
}

.top_page .list .item .image .state.classic {
    color: #663e97;
    background: #ffffff;
    border: 1px solid #663e97;
}

.top_page .list .item .image .state.coupon {
    color: #fff;
    background-color: #ffa93e;
    border: 1px solid #f7b521;
}

.top_page .list .item .image .state.shipping {
    color: #fff;
    background-color: #df0000;
    border: 1px solid #df0000;
}

.top_page .list .item .image .soldout {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.top_page .list .item .image .soldout .inner {
    width: 100%;
    margin: 0;
    padding: 0.3em 0.2em;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transform: translate(-50%, -50%) rotate(-5deg);
    background-color: rgba(225, 6, 6, 0.8);
    position: absolute;
    top: 50%;
    left: 50%;
}

/* お気に入りボタン */
.top_page .list .item .like {
    width: 15px;
    position: absolute;
    bottom: 26px;
    right: 3px;
    z-index: 1;
}

/* ==========================================================================
   6. アイテム詳細：テキスト情報・価格
   ========================================================================== */
.top_page .list .item .info {
    position: relative;
    z-index: 0;
    margin: 0;
}

.top_page .list .item .info>a {
    margin: 0;
    padding: 0;
    display: block;
    transition: all 0.4s 0s;
}

.top_page .list .item .info>a:hover {
    opacity: 0.6;
}

.top_page .list .item .info .category {
    margin-right: 25px;
    padding: 4px;
    line-height: 1.2em;
    font-size: 13px;
    color: #ffffff;
    background: #000000;
    border: 1px solid #000000;
    display: inline-block;
}

.top_page .list .item .name {
    padding: 5px 0 5px 0;
    line-height: 1.4em;
    font-size: 15px;
    color: #000000;
}

.top_page .list .item .name a {
    color: #000000;
}

/* 価格表示 */
.layout_sidebar .top_page .list .item .price {
    padding: 0 0 5px 0;
    line-height: 1em;
    font-size: 18px;
    font-weight: 600;
    color: #E40012;
    font-family: "Inter", sans-serif;
}

.layout_sidebar .top_page .list .item .price .tax {
    padding: 0;
    line-height: 1.2em;
    font-size: 13px;
    font-weight: normal;
    display: inline-block;
}

.layout_sidebar .top_page .list .item .price.tax_included {
    padding: 0;
    line-height: 1.2em;
    font-size: 13px;
    font-weight: normal;
    color: #000000;
}

.layout_sidebar .top_page .list .item .price.tax_included .tax {
    font-size: 11px;
    font-weight: normal;
}

.layout_sidebar .top_page .list .item .price.list_price {
    font-size: 15px;
    font-weight: normal;
    color: #000000;
}

.layout_sidebar .top_page .list .item .price.list_price .text {
    font-size: 13px;
}

.layout_sidebar .top_page .list .item .price.list_price .num {
    text-decoration: line-through;
}

/* ==========================================================================
   7. メディアクエリ（レスポンシブ）
   ========================================================================== */
@media print,
screen and (max-width: 740px) {
    .sp_none {
        display: none;
    }

    .layout_with_sidebar .layout_rest {
        border: none;
    }
}