 :root {
     /* --main:#b7015b;
    --main-dark:#8e0046;
    --accent-bg:#fdeef4;
    --line:#e5c3d2; */
     --text: #333;
     --muted: #888;
     --price: #cc0033;
     --new: #e60012;
     --hot: #e8541a;
     --point: #f39800;
 }

 * {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
 }

 body {
     font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
     color: var(--text);
     background: #fff;
     font-size: 14px;
     line-height: 1.5;
 }

 a {
     color: inherit;
     text-decoration: none;
 }

 /* ===== プレビュー用ヘッダー（本番では既存ヘッダーを使用） ===== */
 .pv-note {
     background: #fff8c5;
     border-bottom: 1px solid #e0d68a;
     padding: 6px 12px;
     font-size: 12px;
     color: #665c00;
 }

 .site-bar {
     background: var(--color-theme-main);
     color: #fff;
     padding: 10px 16px;
     font-weight: bold;
     font-size: 16px;
 }

 .breadcrumb {
     background: var(--color-theme-dark);
     color: #fff;
     font-size: 12px;
     padding: 6px 16px;
 }

 .wrap {
     /* max-width: 1080px; */
     margin: 0 auto;
     padding: 16px;
 }

 /* ===== ツールバー ===== */
 .toolbar {
     display: flex;
     align-items: center;
     flex-wrap: wrap;
     gap: 12px;
     padding: 10px 12px;
     background: var(--color-bg-header-light);
     border: 1px solid var(--color-line);
     border-radius: 6px;
     margin-bottom: 16px;
 }

 .toolbar .count {
     font-size: 13px;
 }

 .toolbar .count b {
     font-size: 15px;
     color: var(--color-theme-main);
 }

 .toolbar .spacer {
     flex: 1;
 }

 .sort-box {
     display: flex;
     align-items: center;
     gap: 6px;
     font-size: 13px;
 }

 .sort-box select {
     font-size: 13px;
     padding: 6px 8px;
     border: 1px solid var(--color-line);
     border-radius: 4px;
     background: #fff;
     color: var(--text);
 }

 .view-toggle {
     display: flex;
     border: 1px solid var(--color-line);
     border-radius: 4px;
     overflow: hidden;
 }

 .view-toggle button {
     border: none;
     background: #fff;
     padding: 6px 12px;
     font-size: 12px;
     cursor: pointer;
     color: var(--muted);
     display: flex;
     align-items: center;
     gap: 4px;
 }

 .view-toggle button.active {
     background: var(--color-theme-main);
     color: #fff;
 }

 .view-toggle button:focus-visible {
     outline: 2px solid var(--color-theme-dark);
     outline-offset: -2px;
 }

 .view-toggle .ico {
     font-size: 14px;
     line-height: 1;
 }

 /* ===== グリッド表示 ===== */
 .grid {
     display: grid;
     grid-template-columns: repeat(3, 1fr);
     gap: 20px 16px;
     list-style: none;
     padding: 0;
 }

 @media(max-width:1024px) {
     .grid {
         grid-template-columns: repeat(3, 1fr);
     }
 }

 @media(max-width:680px) {
     .grid {
         grid-template-columns: repeat(2, 1fr);
         gap: 16px 10px;
     }

     .grid .func-icons {
         display: none;
     }
 }

 .card {
     border: 1px solid #eee;
     border-radius: 6px;
     overflow: hidden;
     background: #fff;
     transition: box-shadow .15s;
 }

 .card:hover {
     box-shadow: 0 2px 10px rgba(183, 1, 91, .18);
 }

 @media(prefers-reduced-motion:reduce) {
     .card {
         transition: none;
     }
 }

 .thumb {
     position: relative;
     aspect-ratio: 3/4;
     background: #fff;
     display: flex;
     align-items: center;
     justify-content: center;
     color: #aaa;
     font-size: 12px;
     flex: 0 0 50%;
     width: 100%;
     height: 250px;
 }
.thumb img {
     width: 100%;
     height: 250px;
     max-width: 210px;
       object-fit: contain;
     object-position: top;
  display: block;
   aspect-ratio: 3/4;
 }
 .badges {
     position: absolute;
     top: 6px;
     left: 6px;
     display: flex;
     flex-direction: column;
     gap: 4px;
 }

 .badge {
     font-size: 10px;
     font-weight: bold;
     color: #fff;
     padding: 2px 6px;
     border-radius: 2px;
     line-height: 1.4;
 }

 .badge.new {
     background: var(--new);
 }

 .badge.hot {
     background: var(--hot);
 }
 .badge.discontinued {
     background: var(--muted);
 }

 .card-body {
     padding: 8px 10px 12px;
 }

 .swatches {
     display: flex;
     gap: 4px;
     margin-bottom: 6px;
 }

 .sw {
     width: 16px;
     height: 16px;
     border-radius: 2px;
     border: 1px solid #ccc;
 }

 .sw-count {
     font-size: 11px;
     color: var(--muted);
     align-self: center;
 }

 .item-code {
     font-weight: bold;
     font-size: 15px;
     color: var(--color-theme-dark);
 }
.item-attr {
    display: flex;
    gap: 10px;
    font-size: 13px;
     color: var(--text);
     margin-bottom: 6px;
 }

 .item-name {
     font-size: 13px;
      margin-bottom: 6px;
      color: var(--text);
 }

 .brand {
     /* font-size: 11px; */
     /* font-size: 0.875em; */
         display: flex;
    gap: 10px;
        font-size: 13px;
     color: var(--text);
     margin-bottom: 6px;
 }
 @media screen and (max-width: 680px) {
    .item-attr, .brand  {
        flex-direction: column;
        gap: 5px;
        margin-bottom: 10px;
    }
}
 .price-block {
     margin-bottom: 6px;
 }

 .ref-price {
     font-size: 11px;
     color: var(--muted);
     /* text-decoration: line-through; */
 }

 .off {
     display: inline-block;
     font-size: 10px;
     font-weight: bold;
     color: #fff;
     background: var(--price);
     padding: 1px 4px;
     border-radius: 2px;
     margin-left: 4px;
     vertical-align: 1px;
 }

 .price {
     font-size: 16px;
     font-weight: bold;
     color: var(--price);
 }

 .price .tax {
     font-size: 10px;
     font-weight: normal;
 }

 .point {
     font-size: 11px;
     color: var(--point);
 }

 .func-icons {
     display: flex;
     flex-wrap: wrap;
     gap: 3px;
     /* justify-content: space-between; */
 }

 .fi {
     font-size: 9px;
     border: 1px solid #bbb;
     color: #666;
     padding: 1px 4px;
     border-radius: 2px;
     white-space: nowrap;
 }

 .fi.more {
     border-style: dashed;
 }

 /* ===== リスト表示（現行相当・切替用） ===== */
 .list {
     display: none;
     list-style: none;
     border-top: 1px solid var(--color-line);
     padding: 0;
 }

 .list li {
     display: grid;
     /* grid-template-columns: 120px 1fr 180px 160px; */
   grid-template-columns: 120px 1fr 120px 120px 150px;
     gap: 12px;
     padding: 14px 4px;
     border-bottom: 1px solid var(--color-line);
     align-items: start;
     line-height: 1.2!important;
 }

 .list .thumb {
     aspect-ratio: 3/4;
     width: 120px;
         height: 100%;
 }

 .list .col-attr {
     font-size: 12px;
     color: #555;
 }

 .list .col-attr div {
     margin-bottom: 2px;
 }

 @media(max-width:680px) {
     .list li {
         grid-template-columns: 96px 1fr;
         grid-auto-rows: auto;
     }

     .list .thumb {
         width: 96px;
     }

     .list .col-attr {
         display: none;
     }
 }

 /* 表示状態切替 */
 body.mode-list .grid {
     display: none;
 }

 body.mode-list .list {
     display: block;
 }

 /* ===== ページネーション（現行踏襲・簡易） ===== */
 .pager {
     display: flex;
     gap: 6px;
     justify-content: center;
     margin: 24px 0;
     flex-wrap: wrap;
 }

 .pager a {
     border: 1px solid var(--color-line);
     padding: 6px 11px;
     border-radius: 3px;
     font-size: 13px;
     color: var(--color-theme-dark);
 }

 .pager a.cur {
     background: var(--color-theme-main);
     color: #fff!important;
     border-color: var(--color-theme-main);
 }