.cta-band{
    margin: 18px 0 24px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(0,0,0,.28);
    box-shadow: 0 18px 46px rgba(0,0,0,.35);
}
.cta-band__inner{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
}
.cta-band__title{
    margin: 0;
    font-weight: 800;
}
.cta-band__desc{
    margin: 6px 0 0;
    opacity: .9;
    font-size: .95rem;
}
.cta-band__btn{
    white-space: nowrap;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(0,0,0,.35);
    text-decoration: none;
    font-weight: 700;
}
@media (max-width: 640px){
    .cta-band__inner{ flex-direction: column; align-items: stretch; }
    .cta-band__btn{ text-align: center; }
}
.cta-band--bottom{
    margin-top: 36px;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,.22),
        rgba(0,0,0,.38)
    );
}
.cta-band--bottom{
    margin-top: 40px;
    background: linear-gradient(180deg, rgba(0,0,0,.22), rgba(0,0,0,.42));
    box-shadow: 0 24px 60px rgba(0,0,0,.45);
}


.brand-desc{
    margin-top: 8px;
    line-height: 1.7;
    opacity: .92;
}

.brand-action{
    margin-top: auto;
    padding-top: 10px;
}

.brand-link{
    font-weight: 700;
    opacity: .95;
}
.back-nav{
    margin: 8px 0 16px;
}

.back-nav__link{
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(0,0,0,.22);
    text-decoration: none;
    font-weight: 700;
    opacity: .95;
}

.back-nav__link:hover{
    opacity: 1;
}
.site-closing{
    margin: 48px 0 24px;
    text-align: center;
    font-size: .95rem;
    opacity: .75;
}
/* ===== Brand list (shared) ===== */

.brand-thumb{
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.brand-thumb img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-tags{
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.brand-tags li{
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
}

.brand-action{
  margin-top: auto;
  padding-top: 12px;
}


/* 「タグ」ブロックがある場合は高さを確保して揃える（任意だが効く） */
.brand-tags {
  min-height: 34px; /* タグ1行分を確保（必要なら調整） */
}

/* 画像リンクは上、本文ブロックが残り高さを担当 */
.brand-image-link{
  display:block;
}

/* CTA行を最下部に押し下げる（これで揃う） */
.brand-link-wrap{
  margin-top:auto;
}

/* （任意）タグの有無で段差が出るのを更に抑える */
.brand-tags{
  margin-top: 10px;
  min-height: 34px;    /* タグ1行分確保。不要なら消してOK */
}
/* ===== Brand list (unified) ===== */

/* 画像の“枠の高さ”を固定 → これでカード内の開始位置が揃う */
.brand-image-link{
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.brand-lead{
  margin: 0;
}

/* タグは “あってもなくても” レイアウトが崩れないように */
.brand-tags{
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 4px 0 0;
  min-height: 30px; /* タグ無しでも高さを確保したい場合 */
}

.brand-link-wrap{
  margin-top: auto; /* ←これでCTAが底に押し込まれる */
  margin-bottom: 0;
}
.brand-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
/* ===== Brand list (UNIFIED) ===== */

.brand-grid{
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px){
  .brand-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px){
  .brand-grid{ grid-template-columns: 1fr; }
}

.brand-card{
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}

/* 画像枠を固定 */
.brand-image-link{
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

/* 本文ブロックが高さを担当 */
.brand-body{
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

/* タグが無くても高さを確保 */
.brand-tags{
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  gap: 8px;
  min-height: 30px;
}

/* CTAを必ず最下部へ */
.brand-link-wrap{
  margin-top: auto;
}

.brand-link{
  font-weight: 600;
}
/* === Brand hero: image → Amazon link === */
.brand-hero-link{
    display: block;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255,255,255,0.08);
    text-decoration: none;
}

.brand-hero-link .brand-hero-img{
    display: block;
    width: 100%;
    height: auto;
    transition: transform 160ms ease, filter 160ms ease;
}

/* “どこに飛ぶか”の明示（誤タップ対策にもなる） */
.hero-caption{
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.75;
    line-height: 1.4;
}

/* PC hover：リンク感 */
@media (hover:hover){
    .brand-hero-link:hover .brand-hero-img{
        transform: scale(1.01);
        filter: brightness(1.02);
    }
    .brand-hero-link:hover .hero-amazon-badge{
        background: rgba(10, 10, 10, 0.82);
        border-color: rgba(255,255,255,0.32);
    }
}

/* 中央帯（ベスト案）：画像下中央に“帯”として配置 */
.hero-amazon-badge{
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 12px;
    transform: translateX(-50%);

    padding: 10px 14px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;

    background: rgba(10, 10, 10, 0.78);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.22);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.28);
}

/* スマホ：少し大きくして意図をより明確に */
@media (max-width: 640px){
    .hero-amazon-badge{
        bottom: 10px;
        padding: 12px 16px;
        font-size: 13px;
    }
}
.brand-hero-media {
    max-width: 360px;          /* ← ここが基準サイズ */
    margin: 0 auto 2rem;
}

.brand-hero-media img {
    width: 100%;
    height: auto;
    max-height: 520px;         /* ← 縦にデカくなりすぎない保険 */
    object-fit: contain;       /* ← 切らない・歪めない */
    display: block;
}
.brand-hero-media {
    max-width: 300px;
}
/* Brand hero layout */
.brand-hero {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

/* 画像は左 */
.brand-hero-media {
    max-width: 320px;      /* 好みで 280–360 */
    margin: 0;             /* ← 中央寄せを殺す */
    flex-shrink: 0;
}

/* テキストは右 */
.brand-hero-text {
    flex: 1;
}
/* ========== Link Cards (shared) ========== */
.link-grid{
  display:grid;
  gap:16px;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  margin-top:16px;
}

.link-card{
  display:block;
  padding:16px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  background:rgba(255,255,255,.04);
  text-decoration:none;
}

.link-card:hover{
  background:rgba(255,255,255,.06);
}

.link-card-title{
  display:block;
  font-weight:700;
  margin-bottom:6px;
  line-height:1.2;
}

.link-card-text{
  display:block;
  opacity:.9;
  line-height:1.6;
  font-size:.95rem;
}
/* 銘柄一覧カードの画像統一 */
.brand-card img,
.brand-image {
    width: 100%;
    max-height: 260px;      /* ← ここが重要 */
    object-fit: contain;   /* ← 縦横比を保つ */
    display: block;
    margin: 0 auto;
}
.card {
  display: block;
}
.card-grid { display: grid; gap: 16px; }
.card-grid .card { display: block; text-decoration: none; color: inherit; }
/* タグ（ピル表示） */
.brand-tags {
  margin-top: 8px;
}

.brand-tags .tag {
  display: inline-block;
  padding: 4px 10px;
  margin: 4px 6px 0 0;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ddd;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.tag {
  display: inline-block;
  padding: 4px 10px;
  margin: 4px 6px 0 0;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ddd;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
/* card grid */
.card-grid{
  display:grid;
  gap:16px;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
}

.card{
  display:block;
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  background:rgba(255,255,255,.04);
  text-decoration:none;
}

.card-content{
  padding:16px;
}

.card h3{
  margin:0 0 8px;
}

.card p{
  margin:0;
  opacity:.85;
}
.brand-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.brand-link {
  margin-top: auto;
}
.brand-card {
  display: flex;
  flex-direction: column;
}
.card img {
    display: block;
    margin: 0 auto;
}
.card-media {
    display: flex;
    justify-content: center;
}

/* ここが原因：display:block が flex を潰してる */
.card-grid .card{
  display:flex;              /* ← block から変更 */
  flex-direction: column;
  height: 100%;
  text-decoration:none;
  color:inherit;
}

/* 中身も縦flexにしてリンクを下に押す */
.card-content{
  padding:16px;
  display:flex;
  flex-direction: column;
  flex: 1;
}

.card-link{
  margin-top:auto;
}

/* =========================================================
   FINAL OVERRIDES（末尾に置く想定）
   - card-grid（.card）用：CTA下揃え
   - brand-grid（.brand-card）用：CTA下揃え
   - 画像枠：崩れない統一
   ========================================================= */

/* ===== card-grid（ジン一覧など） ===== */
.card-grid{
  display:grid;
  gap:16px;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
}

.card-grid .card{
  display:flex;
  flex-direction:column;
  height:100%;
  text-decoration:none;
  color:inherit;
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  background:rgba(255,255,255,.04);
}

.card-image{
  width:100%;
  aspect-ratio: 4 / 3;
  border-radius:14px;
  overflow:hidden;
  background: rgba(0,0,0,.25);
  display:flex;
  align-items:center;
  justify-content:center;
}

.card-image img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.card-content{
  padding:16px;
  display:flex;
  flex-direction:column;
  flex:1;
  gap:10px;
}

.card-tags{
  margin-top:4px;
  min-height:30px;
}

.card-link{
  margin-top:auto;
  font-weight:700;
  opacity:.95;
}

/* ===== brand-grid（ブランドカード共通） ===== */
.brand-grid{
  display:grid;
  gap:24px;
  grid-template-columns:repeat(3, minmax(0, 1fr));
}
@media (max-width: 980px){ .brand-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px){ .brand-grid{ grid-template-columns: 1fr; } }

.brand-card{
  display:flex;
  flex-direction:column;
  height:100%;
  padding:18px;
  border-radius:18px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  text-decoration:none;
  color:inherit;
}

.brand-image-link{
  width:100%;
  aspect-ratio:4 / 3;
  border-radius:14px;
  overflow:hidden;
  background: rgba(0,0,0,.25);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:12px;
}

.brand-image-link img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.brand-body{
  display:flex;
  flex-direction:column;
  flex:1;
  gap:10px;
}

.brand-tags{
  min-height:30px;
}

.brand-link-wrap{
  margin-top:auto;
}

.brand-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:700;
  opacity:.95;
}

/* ===== brand hero（銘柄ページ上部） ===== */
.brand-hero{
  display:flex;
  align-items:flex-start;
  gap:2rem;
}

.brand-hero-media{
  max-width:320px;
  margin:0;
  flex-shrink:0;
}

.brand-hero-media img{
  width:100%;
  height:auto;
  max-height:520px;
  object-fit:contain;
  display:block;
}

.category-card--top {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    height: 100%;
}

.category-card--top .category-title,
.category-card--top .category-sub,
.category-card--top .category-desc,
.category-card--top .category-link {
    margin-top: 0;
}

.category-card--top .category-desc {
    margin-bottom: 0;
}

.category-card--top .category-link {
    align-self: end;
    margin-bottom: 0;
    padding-top: 18px;
}

.category-grid--top {
    align-items: stretch;
}

.category-grid--top .category-card--top {
    height: 100%;
}

.card-image {
  background: #fff !important;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-title {
  line-height: 1.5;
  min-height: 4.5em; /* 3行ぶん */
}

.card-desc {
  line-height: 1.8;
  min-height: 5.4em; /* 3行ぶん */
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  margin: 0;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: nowrap;
}

.brand-card {
  display: flex;
  flex-direction: column;
}

.brand-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.brand-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-desc {
  line-height: 1.8;
  min-height: 5.4em;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  margin: 0;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: nowrap;
}

.card-more {
  margin-top: auto;
  padding-top: 12px;
}

.card-title {
  line-height: 1.45;
  height: 4.4em;   /* 約3行分 */
  overflow: hidden;
}

.card-desc {
  line-height: 1.8;
  height: 5.4em;   /* 約3行分 */
  overflow: hidden;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  min-height: 68px; /* 2段分くらい確保 */
  align-content: flex-start;
}

.tag-list li {
  margin: 0;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: nowrap;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-more {
  margin-top: auto;
  padding-top: 12px;
}

.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.card-image {
  background: #f5f5f5;
}

.card-more {
  color: #d4af37;
}

.brand-image {
  background: #fff;
}

.brand-hero-img {
  background: #fff;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    align-items: stretch;
}

.category-card {
    height: 100%;
    border-radius: 12px;
}

.brand-card-media {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.brand-card {
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.brand-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.16);
}

.brand-card:active {
  transform: translateY(-2px) scale(0.98);
}

.brand-card-media img {
  transition: transform 0.3s ease;
}

.brand-card:hover .brand-card-media img {
  transform: scale(1.05);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.tag-list li {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
  color: #d7c29a;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

.tag-list li {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(201, 168, 107, 0.28);
  background: rgba(201, 168, 107, 0.08);
  color: #d6b77a;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
}

.brand-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(201, 168, 107, 0.28);
  background: rgba(201, 168, 107, 0.08);
  color: #d6b77a;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
}