@charset "utf-8";

/* =========================================================
   Master Layout Wrapper (3モード共通)
========================================================= */
.itemcard-master-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
}
.itemcard-content-area {
  flex-grow: 1;
  width: 100%;
}

/* ---------------------------------------------------------
   モード1: サイドバー (ダークテーマ同化 ＋ 発光UI)
--------------------------------------------------------- */
.itemcard-sidebar {
  width: 250px;
  flex-shrink: 0;
  /* 背景の漆黒に溶け込む半透明ダーク */
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 20px;
  position: sticky;
  top: 20px;
  box-sizing: border-box;
}
.itemcard-sidebar__block {
  margin-bottom: 25px;
}

/* 見出しとクリアボタンのコンテナ */
.itemcard-sidebar__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}
.itemcard-sidebar__title {
  color: var(--ghost-white, #fbfdff);
  font-size: 1.05rem;
  margin: 0;
}
.itemcard-sidebar__clear {
  font-size: 0.75rem;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}
.itemcard-sidebar__clear:hover {
  color: var(--color-highlight, #83ccd2);
}

.itemcard-sidebar__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.itemcard-sidebar__list li {
  margin-bottom: 6px;
}
.itemcard-sidebar__list a {
  color: #9ca3af; /* 待機時は目立たないダークグレー */
  font-size: 0.85rem;
  display: block;
  padding: 6px 10px;
  border-radius: 4px;
  transition: all 0.2s;
  text-decoration: none;
}
.itemcard-sidebar__list a:hover {
  color: var(--ghost-white, #fbfdff);
  background-color: rgba(255, 255, 255, 0.05);
}
.itemcard-sidebar__list a.is-active {
  color: var(--color-highlight, #83ccd2); /* 選択時は白群色で発光 */
  background-color: rgba(131, 204, 210, 0.1);
  font-weight: bold;
  border-left: 3px solid var(--color-highlight, #83ccd2);
}

/* ---------------------------------------------------------
   モード2 & 基本: Fluid Grid
--------------------------------------------------------- */
.itemcard-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  width: 100%;
}

.itemcard-container {
  background-color: var(--color-light-bg, #ffffff);
  border: 1px solid var(--color-light-border-light, #e5e7eb);
  border-radius: 4px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition:
    transform 0.3s,
    border-color 0.3s,
    box-shadow 0.3s;
  box-sizing: border-box;
  position: relative;
}
.itemcard-container:hover {
  transform: translateY(-5px);
  border-color: var(--color-highlight, #83ccd2);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.itemcard-header {
  width: calc(100% + 40px);
  margin: -20px -20px 20px -20px;
  background-color: var(--color-corp-base, #1c305c);
  color: var(--ghost-white, #fbfdff);
  text-align: left;
  padding: 12px 20px;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 4px 4px 0 0;
  box-sizing: border-box;
}

.itemcard-thumb {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
}
.itemcard-no-image {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-light-text-muted, #4b5563);
  background: var(--color-light-bg-alt, #f9fafb);
  border-radius: 4px;
}

/* =========================================================
   アイコンリスト（横4列 × 縦2行の完全固定・正方形維持）
========================================================= */
.itemcard-icon-list {
  display: grid;
  grid-template-columns: repeat(4, 64px);
  grid-template-rows: repeat(2, 64px);
  gap: 8px;
  height: 136px;
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  justify-content: start;
}

.itemcard-icon-item {
  width: 64px;
  height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--color-functional, #005243);
  color: var(--ghost-white, #fbfdff);
  border-radius: 4px;
  line-height: 1.1;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

/* ① タグ＆メーカー用 (SVG形式) */
.itemcard-icon-svg {
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin-bottom: 2px;
  filter: invert(1);
}
.itemcard-icon-label {
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  padding: 0 2px;
  box-sizing: border-box;
}

/* テキストバッジ */
.itemcard-icon-text-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: -0.03em;
  margin-bottom: 3px;
  box-sizing: border-box;
}

/* ② 性能概要 ＆ レンタル用共通分割クラス */
.itemcard-icon-triple {
  display: grid;
  grid-template-rows: 16px 32px 16px;
  align-items: center;
  justify-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
}
.itemcard-icon-triple-top {
  font-size: 8.5px;
  line-height: 16px;
  opacity: 0.9;
  text-transform: uppercase;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: -0.04em;
  padding: 0 2px;
  box-sizing: border-box;
}
.itemcard-icon-triple-main {
  font-size: 11.5px;
  font-weight: bold;
  line-height: 1.15;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 2px;
  box-sizing: border-box;
}
.itemcard-icon-triple-main.is-short {
  font-size: 16px;
}
.itemcard-icon-triple-bottom {
  font-size: 8.5px;
  line-height: 16px;
  opacity: 0.9;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: -0.02em;
  padding: 0 2px;
  box-sizing: border-box;
}

/* パレット */
.is-color-intel {
  background-color: #0071c5 !important;
}
.is-color-amd {
  background-color: #ed1c24 !important;
}
.is-color-nvidia {
  background-color: #76b900 !important;
}
.is-color-maker-samsungssd {
  background-color: #1428a0 !important;
}
.is-color-maker-zbox {
  background-color: #eeb111 !important;
}
.is-color-verified {
  background-color: var(--color-corp-base, #1c305c) !important;
}
.is-color-generic {
  background-color: var(--color-functional, #005243) !important;
}

/* =========================================================
   スペックリスト＆価格
========================================================= */
.itemcard-speclist {
  margin-bottom: 20px;
  flex-grow: 1;
}
.itemcard-speclist-heading {
  color: var(--color-primary, #65318e) !important;
  font-weight: bold;
}
.itemcard-speclist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-light-border-light, #e5e7eb);
  font-size: 0.9rem;
}
.itemcard-speclist-label {
  color: var(--color-light-text-muted, #4b5563);
}
.itemcard-speclist-value {
  color: var(--color-light-text, #111827);
  text-align: right;
  font-weight: bold;
}

.itemcard-price-box {
  margin-bottom: 20px;
}
.itemcard-price-label {
  font-size: 0.8rem;
  color: var(--color-light-text-muted, #4b5563);
}
.itemcard-price-unit,
.itemcard-price-tilde {
  font-size: 1.2rem;
  color: var(--color-light-text, #111827);
}
.itemcard-price-amount {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--color-light-text, #111827);
}

.itemcard-model-name {
  font-size: 1.15rem;
  color: var(--color-light-text, #111827);
  font-weight: bold;
}
.itemcard-model-code {
  color: var(--color-light-text-muted, #4b5563);
}

/* =========================================================
   モード3: 簡易リスト
========================================================= */
.itemcard-list-layout {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}
.itemcard-container--list {
  background-color: var(--color-light-bg, #ffffff);
  border: 1px solid var(--color-light-border-light, #e5e7eb);
  border-radius: 4px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition:
    transform 0.3s,
    border-color 0.3s;
  box-sizing: border-box;
  width: 100%;
}
.itemcard-container--list:hover {
  transform: translateX(5px);
  border-color: var(--color-highlight, #83ccd2);
}
.itemcard-list-left {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 220px;
  flex-shrink: 0;
}
.itemcard-header--simple {
  background-color: var(--color-corp-base, #1c305c);
  color: var(--ghost-white, #fbfdff);
  padding: 6px 12px;
  border-radius: 2px;
  font-size: 0.85rem;
  font-weight: bold;
  white-space: nowrap;
}
.itemcard-thumb--simple {
  max-width: 80px;
  max-height: 80px;
  object-fit: contain;
}
.itemcard-no-image--simple {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-light-text-muted, #4b5563);
  background: var(--color-light-bg-alt, #f9fafb);
  border-radius: 2px;
}
.itemcard-list-center {
  flex-grow: 1;
}
.itemcard-model-name--list {
  font-size: 1.1rem;
  color: var(--color-light-text, #111827);
  font-weight: bold;
}
.itemcard-model-code--list {
  color: var(--color-light-text-muted, #4b5563);
}
.itemcard-list-specs {
  color: var(--color-light-text-muted, #4b5563);
}
.itemcard-price-box--simple {
  font-weight: bold;
  font-size: 1.4rem;
  color: var(--color-light-text, #111827);
}
.itemcard-list-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  width: 180px;
  flex-shrink: 0;
}

/* =========================================================
   スマホ用レスポンシブ (チップUIもダーク＆発光対応)
========================================================= */
@media screen and (max-width: 768px) {
  .itemcard-master-layout {
    flex-direction: column;
    gap: 15px;
  }
  .itemcard-sidebar {
    width: 100%;
    position: static;
    top: auto;
    padding: 15px;
    background-color: transparent;
    border: none;
  }
  .itemcard-sidebar__block {
    margin-bottom: 20px;
  }
  .itemcard-sidebar__header {
    border-bottom: none;
    margin-bottom: 8px;
  }

  .itemcard-sidebar__list {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding-bottom: 5px;
  }
  .itemcard-sidebar__list li {
    margin-bottom: 0;
  }
  .itemcard-sidebar__list a {
    display: inline-block;
    border-radius: 20px;
    padding: 6px 16px;
    background-color: rgba(255, 255, 255, 0.05); /* ダークチップ */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
  }
  .itemcard-sidebar__list a.is-active {
    background-color: rgba(131, 204, 210, 0.15); /* 発光チップ */
    color: var(--color-highlight, #83ccd2);
    border-color: var(--color-highlight, #83ccd2);
  }

  .itemcard-grid {
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    gap: 20px;
  }
  .itemcard-container--list {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .itemcard-list-left,
  .itemcard-list-center,
  .itemcard-list-right {
    width: 100%;
    align-items: flex-start;
  }
  .itemcard-list-right {
    align-items: stretch;
    margin-top: 5px;
  }
}
