/* ==============================================
   商品一覧 (products.html) ページ専用スタイル
   ============================================== */

/* ─── レイアウト ────────────────────────────── */

.products-layout {
  display: flex;
  align-items: flex-start;
  min-height: 60vh;
  padding-bottom: 60px;
}

/* ─── サイドバー ────────────────────────────── */

.products-sidebar {
  width: 333px;
  min-width: 333px;
  padding: 40px 48px 60px;
  flex-shrink: 0;
  position: sticky;
  top: 76px; /* header height */
  max-height: calc(100vh - 76px);
  /*overflow-y: auto;*/
  /*scrollbar-width: thin;*/
}
.products-sidebar {
  overflow-y: scroll;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* Internet Explorer 10+ */
}

.products-sidebar::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera*/
}

/*.products-sidebar::-webkit-scrollbar {*/
/*  width: 4px;*/
/*}*/

/*.products-sidebar::-webkit-scrollbar-thumb {*/
/*  background: #ccc;*/
/*  border-radius: 4px;*/
/*}*/

/* サイドバータイトル */
.sidebar-title {
  font-size: 48px;
  font-weight: 500;
  color: #000;
  line-height: 1.2;
  margin-bottom: 20px;
}

/* アクティブフィルタータグ */
.active-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f1f1;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  color: #000;
}

.filter-tag-remove {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
}

.filter-clear {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #000;
  text-decoration: underline;
  padding: 0;
  white-space: nowrap;
}

/* フィルターグループ */
.filter-group {
  border-top: 1px solid #e0e0e0;
  padding: 16px 0;
}

.filter-group:last-child {
  border-bottom: 1px solid #e0e0e0;
}

.filter-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-bottom: 0;
}

.filter-group-header span {
  font-size: 18px;
  font-weight: 700;
  color: #000;
}

.filter-chevron {
  transition: transform 0.2s ease;
}

.filter-group.closed .filter-chevron {
  transform: rotate(180deg);
}

.filter-group.closed .filter-options,
.filter-group.closed .filter-color-grid {
  display: none;
}

.filter-options {
  list-style: none;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  font-weight: 400;
  color: #000;
  cursor: pointer;
  white-space: nowrap;
}

.filter-option-active {
  font-weight: 600;
}

.filter-option-disabled {
  color: #929292;
}

/* レンズカラーグリッド */
.filter-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
}

.filter-color-grid img {
  width: 49px;
  height: 49px;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.filter-color-grid img:hover {
  transform: scale(1.1);
}

/* ─── 商品コンテンツ ────────────────────────────── */

.products-content {
  flex: 1;
  padding: 0 48px 60px 32px;
  min-width: 0;
}

/* パンくずリスト */
.products-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 0;
  font-size: 12px;
  font-weight: 400;
  color: #4a4a4a;
  letter-spacing: 1px;
}

.products-breadcrumb a {
  color: #4a4a4a;
  text-decoration: none;
}

.products-breadcrumb a:hover {
  text-decoration: underline;
}

.products-breadcrumb img {
  width: 18px;
  height: 18px;
  display: block;
}

/* ─── 商品グリッド ────────────────────────────── */

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 16px;
}

/* 商品カード */
.pl-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
  border: 1px solid #b5b5b5;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.pl-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,0.14);
  transform: translateY(-4px);
  border-color: #000;
}

/* タグ行 (上部) */
.pl-card-tags {
  position: absolute;
  top: 9px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  z-index: 2;
  min-height: 35px;
}

/* セールバッジ (右上) */
.pl-card-badge {
  position: absolute;
  top: 9px;
  right: 8px;
  z-index: 3;
}

.tag-sale-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ff3a3a;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  margin-right: 3px;
}

/* タグ */
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 10px;
  line-height: 1;
  white-space: nowrap;
}

.tag-black {
  background: #000;
  color: #fff;
}

.tag-outline {
  background: #fff;
  color: #000;
  border: 1px solid #000;
}

/* 商品画像 */
.pl-card-image {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  margin-top: 44px;
}

.pl-card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* 商品情報 */
.pl-card-info {
  padding: 0 16px 16px;
}

.pl-card-name {
  font-size: 18px;
  font-weight: 500;
  color: #000;
  margin-bottom: 4px;
  line-height: 1.3;
}

.pl-card-sub {
  font-size: 13px;
  font-weight: 500;
  color: #8e8e8e;
  margin-bottom: 8px;
}

.pl-card-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.pl-price-sale {
  font-size: 18px;
  font-weight: 700;
  color: #b80000;
}

.pl-price-strike {
  font-size: 14px;
  font-weight: 500;
  color: #8e8e8e;
  text-decoration: line-through;
}

.pl-card-swatches {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.pl-card-swatches img {
  width: 23px;
  height: 23px;
  display: block;
  border-radius: 50%;
}

/* ─── ツールバー（件数・並び替え） ──────────────── */

.products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 16px;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 4px;
}

.products-count {
  font-size: 14px;
  color: #6c6c6c;
  font-weight: 400;
}

.products-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #333;
}

.sort-select {
  font-family: inherit;
  font-size: 14px;
  color: #000;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 5px 28px 5px 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 8px center no-repeat;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.sort-select:hover,
.sort-select:focus {
  border-color: #000;
  outline: none;
}

/* ─── フィルタータグ アニメーション ─────────────── */

.filter-tag {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.filter-tag-new {
  opacity: 0;
  transform: scale(0.85) translateY(-4px);
}

.filter-tag-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.filter-tag-removing {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

/* フィルターオプション トランジション */
.filter-option {
  transition: opacity 0.15s ease;
  user-select: none;
}

.filter-option-active {
  font-weight: 600;
}

/* カラースウォッチ選択状態 */
.filter-color-grid img.filter-color-active {
  outline: 2px solid #000;
  outline-offset: 2px;
  transform: scale(1.1);
}

/* ─── 商品カード ホバー画像ズーム ───────────── */

.pl-card-image img {
  transition: transform 0.35s ease;
}

.pl-card:hover .pl-card-image img {
  transform: scale(1.06);
}

/* ナビゲーション アクティブ状態 */
.nav-active {
  font-weight: 700 !important;
  border-bottom: 2px solid #000;
  padding-bottom: 2px;
}

/* ─── レスポンシブ ────────────────────────────── */

@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-sidebar {
    width: 280px;
    min-width: 280px;
    padding: 40px 32px 60px;
  }

  .sidebar-title {
    font-size: 36px;
  }
}

@media (max-width: 900px) {
  .products-layout {
    flex-direction: column;
    padding-bottom: 30px;
  }

  .products-sidebar {
    width: 100%;
    min-width: 100%;
    position: static;
    max-height: none;
    padding: 24px 24px 8px;
  }

  .products-content {
    padding: 0 24px 48px;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .tag{
    font-size: 8px;
  }
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    /*grid-template-columns: 1fr;*/
grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .pl-card-image {
    /*height: 200px;*/
        height: 90px;
  }
}
