/* =========================================================
   /assets/css/brands.css
   ブランド機能（一覧 + 詳細）専用
   整理版 完全版
   ========================================================= */

/* =========================
   Shared
   ========================= */

@media (hover:hover) and (pointer:fine){
  a.brand-card:hover{
    text-decoration:none;
  }
}

.sort-select{
  font-size:12px;
  padding:6px 10px;
  border-radius:6px;
  border:1px solid var(--border-soft);
  background:#fff;
  color:var(--text-main);
}

/* =========================================================
   Brand list
   ========================================================= */

.brands-toolbar{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-bottom:14px;
}

.brands-count{
  margin:0;
  font-size:13px;
  color:var(--text-muted);
}

.brands-filter-group{
  display:flex;
  flex-direction:column;
  gap:10px;
  background:#fff;
  border:1px solid var(--border-soft);
  border-radius:12px;
  padding:12px;
  box-shadow:0 1px 3px rgba(15,23,42,0.04);
}

.brands-filter-label{
  font-size:13px;
  font-weight:700;
  color:var(--text-main);
}

.brands-filter-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.brands-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:7px 12px;
  border-radius:6px;
  border:1px solid var(--border-soft);
  background:var(--bg-soft);
  color:var(--text-main);
  font-size:13px;
  line-height:1.4;
  text-decoration:none;
  cursor:pointer;
  transition:
    transform .15s ease,
    box-shadow .15s ease,
    border-color .15s ease,
    background .15s ease;
}

.brands-chip.is-active{
  background:var(--accent-soft);
  border-color:var(--accent-border);
  color:var(--accent-main-deep);
}

.brands-chip.is-sub{
  min-height:32px;
  padding:6px 10px;
  font-size:12px;
  border-radius:6px;
}

.brands-grid{
  display:grid;
  gap:12px;
}

.brand-card{
  display:flex;
  flex-direction:column;
  height:100%;
  background:var(--bg-card);
  border:1px solid var(--border-soft);
  border-radius:12px;
  padding:14px;
  box-shadow:0 1px 3px rgba(15,23,42,0.04);
  color:var(--text-main);
  text-decoration:none;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}

.brand-card-head{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin-bottom:10px;
}

/* 一覧ロゴ */
.brand-logo-box{
  width:96px;
  height:56px;
  border-radius:8px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  overflow:hidden;
  padding:6px;
}

.brand-logo-image{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.brand-logo-placeholder{
  width:96px;
  height:56px;
  border-radius:8px;
  background:#f8fafc;
  border:1px dashed #dbe3ee;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:700;
  color:#cbd5e1;
  flex:0 0 auto;
  letter-spacing:.05em;
}

.brand-main{
  min-width:0;
  flex:1;
}

.brand-name{
  margin:0 0 2px;
  font-size:18px;
  line-height:1.35;
  font-weight:800;
  letter-spacing:-0.01em;
}

.brand-country{
  margin:0;
  font-size:13px;
  color:var(--text-muted);
  line-height:1.6;
}

.brand-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:10px;
}

.brand-chip{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:6px 10px;
  border-radius:6px;
  background:var(--bg-soft);
  border:1px solid var(--border-soft);
  font-size:12px;
  font-weight:700;
  color:var(--text-main);
  line-height:1.4;
}

.brand-card-foot{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:4px;
  margin-top:auto;
  color:var(--accent-main-deep);
  font-size:13px;
  font-weight:700;
}

@media (hover:hover) and (pointer:fine){
  .brands-chip:hover{
    box-shadow:0 1px 3px rgba(15,23,42,0.04);
    border-color:#d7dfe8;
    transform:translateY(-1px);
  }

  .brand-card:hover{
    box-shadow:0 2px 8px rgba(15,23,42,0.05);
    border-color:#d7dfe8;
    transform:translateY(-2px);
  }
}

@media (min-width:768px){
  .brands-grid{
    grid-template-columns:1fr 1fr;
  }
}

/* =========================================================
   Brand detail v2
   ========================================================= */

.brandv2-summary{
  background:#fff;
  border:1px solid var(--border-soft);
  border-radius:12px;
  padding:14px;
  box-shadow:0 1px 3px rgba(15,23,42,0.04);
}

.brandv2-summary-top{
  display:flex;
  align-items:flex-start;
  gap:14px;
}

.brandv2-logo{
  width:112px;
  height:52px;
  border-radius:8px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  overflow:hidden;
  padding:6px;
}

.brandv2-logo-image{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.brandv2-logo-placeholder{
  font-size:12px;
  font-weight:600;
  color:#cbd5e1;
  letter-spacing:.08em;
}
.brandv2-main{
  min-width:0;
  flex:1;
}

.brandv2-name{
  margin:0 0 4px;
  font-size:24px;
  line-height:1.3;
  font-weight:800;
  letter-spacing:-0.01em;
}

.brandv2-kana{
  margin:0 0 8px;
  font-size:13px;
  line-height:1.6;
  color:var(--text-muted);
}

.brandv2-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.brandv2-chip{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:6px 10px;
  border-radius:6px;
  background:var(--bg-soft);
  border:1px solid var(--border-soft);
  font-size:12px;
  font-weight:700;
  color:var(--text-main);
  line-height:1.4;
}

.brandv2-description{
  margin:16px 0 0;
  font-size:14px;
  line-height:1.9;
  color:var(--text-muted);
}

.brandv2-links{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:16px;
}

.brandv2-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:38px;
  padding:8px 12px;
  border-radius:6px;
  border:1px solid var(--border-soft);
  background:#fff;
  color:var(--text-main);
  font-size:13px;
  font-weight:700;
  text-decoration:none;
}

.brandv2-link .material-symbols-rounded{
  font-size:16px;
  color:var(--accent-main-deep);
}

.brandv2-note{
  margin:14px 0 0;
  font-size:12px;
  line-height:1.7;
  color:var(--text-muted);
}

.brandv2-list-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.brandv2-sort{
  flex:0 0 auto;
}

.brandv2-grid{
  display:grid;
  gap:12px;
}

.brandv2-food-card{
  display:block;
  background:#fff;
  border:1px solid var(--border-soft);
  border-radius:12px;
  padding:12px;
  box-shadow:0 1px 3px rgba(15,23,42,0.04);
  color:var(--text-main);
  text-decoration:none;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}

.brandv2-food-top{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin-bottom:10px;
}

.brandv2-food-image{
  width:74px;
  height:74px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  overflow:hidden;
}

.brandv2-food-image img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.brandv2-food-fallback{
  font-size:22px;
  color:var(--text-soft);
}

.brandv2-food-main{
  min-width:0;
  flex:1;
}

.brandv2-food-brand{
  display:block;
  margin-bottom:2px;
  font-size:11px;
  line-height:1.35;
  color:var(--accent-main-deep);
  font-weight:700;
  letter-spacing:.04em;
}

.brandv2-food-name{
  margin:0 0 8px;
  font-size:17px;
  line-height:1.42;
  font-weight:800;
  word-break:break-word;
  min-height:48px;
}

.brandv2-food-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.brandv2-tag{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:6px 10px;
  border-radius:6px;
  background:var(--bg-soft);
  border:1px solid var(--border-soft);
  font-size:10px;
  color:var(--text-main);
  line-height:1.4;
}

.brandv2-tag.method-dry{
  background:#eef2ff;
  color:#3730a3;
}

.brandv2-tag.method-airdry{
  background:#ecfdf5;
  color:#047857;
}

.brandv2-tag.method-freezedry{
  background:#fef3c7;
  color:#92400e;
}

.brandv2-tag.method-openbake{
  background:#e0f2fe;
  color:#075985;
}

.brandv2-tag.method-wet{
  background:#fee2e2;
  color:#b91c1c;
}

.brandv2-tag.method-raw{
  background:#dcfce7;
  color:#166534;
}

.brandv2-tag.method-unknown{
  background:#f3f4f6;
  color:#6b7280;
}

.brandv2-nutrition-row{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:10px;
  margin-top:16px;
}

.brandv2-nutrition-item{
  background:#f9fafb;
  border:none;
  border-radius:8px;
  padding:8px 6px;
  text-align:center;
}

.brandv2-nutrition-label{
  display:block;
  margin-bottom:4px;
  font-size:11px;
  line-height:1.4;
  color:var(--text-soft);
}

.brandv2-nutrition-value{
  display:block;
  font-size:14px;
  line-height:1.3;
  font-weight:800;
  color:var(--text-main);
}

.brandv2-food-foot{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:4px;
  margin-top:12px;
  color:var(--accent-main-deep);
  font-size:13px;
  font-weight:700;
}

@media (hover:hover) and (pointer:fine){
  .brandv2-link:hover{
    background:var(--accent-soft);
    border-color:var(--accent-border);
  }

  .brandv2-food-card:hover{
    box-shadow:0 2px 8px rgba(15,23,42,0.05);
    border-color:#d7dfe8;
    transform:translateY(-2px);
  }
}

@media (max-width:767px){
  .brandv2-list-head{
    flex-direction:column;
    align-items:flex-start;
  }
}

@media (min-width:768px){
  .brandv2-grid{
    grid-template-columns:1fr 1fr;
  }
}