/* ホームページ固有スタイル */
/*================== お酒の種類で選ぶ ===================*/

/* theme.css の変数に合わせてローカル調整 */
:root {
  --home-radius: 12px;
}

.brand-section,
.search-section,
.ranking-section,
.column-section,
.member-section {
  margin-top: 20px;
}

.brand-title,
.search-title,
.ranking-title,
.column-title,
.member-title {
  color: var(--text);
}

.brand-cats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px 16px;
  list-style: none;
  padding: 0;
  margin: 0 auto;
}
.brand-cats li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* モバイルは高さ控えめ */
  height: 140px;
  border: 1px solid var(--border);
  border-radius: var(--home-radius);
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  background: linear-gradient(180deg, var(--surface-1), var(--surface-2));
  padding: 18px;
  gap: 12px;
  box-shadow: 0 6px 18px var(--shadow);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}
.brand-cats li a .brand-image {
  width: clamp(56px, 7vw, 72px);
  height: clamp(56px, 7vw, 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(56px, 7vw, 72px);
  line-height: 1;
  margin-bottom: 8px;
}

.brand-cats li a .brand-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.brand-cats li a .brand-name {
  font-size: clamp(18px, 2.6vw, 22px);
  text-align: center;
  line-height: 1.3;
}
.brand-cats li a:focus,
.brand-cats li a:hover {
  border-color: var(--accent);
  box-shadow:
    0 10px 26px var(--shadow),
    0 0 0 3px var(--accent-soft);
  transform: translateY(-2px);
}

/*======================= 「詳細検索」セクション =======================*/
.search-lead {
  margin: 12px;
  color: var(--muted, #6b6258);
  line-height: 1.75;
}

.search-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.search-item {
  display: flex;
  flex-direction: column;
  background: var(--surface-1, #ffffff);
  border: 1px solid var(--border, #e6ddcf);
  border-radius: 16px;
  box-shadow: 0 10px 26px var(--shadow, rgba(17, 24, 39, 0.12));
  overflow: hidden;
  min-height: 240px;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.search-item:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent, #8a5a2b) 38%, var(--border, #e6ddcf));
  box-shadow: 0 16px 34px var(--shadow, rgba(17, 24, 39, 0.14));
}

.search-item__body {
  padding: 16px 16px 14px;
  flex: 1;
}

.search-item__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}

.search-item__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft, rgba(138, 90, 43, 0.14));
  color: var(--accent, #8a5a2b);
  flex: 0 0 auto;
}

.search-item__icon i {
  font-size: 18px;
  line-height: 1;
}

.search-item__title {
  margin: 0;
  font-size: 18px;
  color: var(--text, #2b2b2b);
}

.search-item__desc {
  margin: 0 0 10px;
  color: var(--muted, #6b6258);
  line-height: 1.7;
}

.search-item__bullets {
  margin: 0;
  padding-left: 1.1em;
  color: var(--text, #2b2b2b);
  line-height: 1.7;
}

.search-item__bullets li {
  margin: 0 0 6px;
}

.search-item__footer {
  padding: 14px 16px 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-1, #ffffff) 70%, var(--surface-2, #f8f2e9)), var(--surface-1, #ffffff));
  border-top: 1px solid var(--border, #e6ddcf);
}

.search-item__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;

  background: var(--accent, #8a5a2b);
  color: var(--accent-contrast, #ffffff);
  box-shadow: 0 10px 18px var(--accent-soft, rgba(138, 90, 43, 0.18));
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.search-item__btn:hover {
  background: var(--accent-hover, #6f4722);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px var(--accent-soft, rgba(138, 90, 43, 0.22));
}

.search-item__btn:active {
  transform: translateY(0);
}

.search-item__btn:focus-visible {
  outline: 2px solid var(--focus-ring, rgba(138, 90, 43, 0.6));
  outline-offset: 3px;
}

/* 検索結果のフィルタ表示切替ボタン */
#toggle-filters {
  padding: 8px 10px;
}

/*======================== ランキング ==========================-*/
.ranking-block {
  padding: 0 0 50px;
}
.ranking-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.ranking-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}
.ranking-grid {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  /* モバイルは1カラム */
  grid-template-columns: 1fr;
  gap: 12px 16px;
}

/* ランキングカードの基本デザイン */
.ranking-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 170px;
  border: 1px solid var(--border);
  border-radius: var(--home-radius);
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  background: var(--surface-1);
  padding: 12px;
  box-shadow: 0 8px 18px var(--shadow);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
  position: relative;
}

/* ランキングカードリンクのスタイル */
.ranking-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
  height: 100%;
}

.ranking-card-link:hover,
.ranking-card-link:focus {
  text-decoration: none;
  color: inherit;
}

.ranking-card:hover,
.ranking-card:focus {
  border-color: var(--accent);
  box-shadow:
    0 14px 26px var(--shadow),
    0 0 0 3px var(--accent-soft);
  transform: translateY(-2px);
}

/* 順位バッジ */
/* 順位バッジ（直角扇形=三角形）: 左上端にぴったり */
.ranking-position {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-top: 56px solid var(--accent);
  border-right: 56px solid transparent;
  z-index: 2;
}
.ranking-position span {
  position: absolute;
  top: -48px;
  left: 10px;
  color: var(--accent-contrast);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

/* 写真領域（将来は実画像へ差し替え） */
.ranking-photo {
  width: 100%;
  height: 88px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(255, 255, 255, 0));
  border: 1px dashed rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
}

html[data-theme="E"] .ranking-photo {
  border-color: rgba(255, 255, 255, 0.18);
}

/* 銘柄画像（アイコン） */
.ranking-card .brand-image {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  line-height: 1;
  opacity: 1;
}

.ranking-card .brand-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ranking-card .brand-image.placeholder {
  opacity: 0.3;
}

/* ランキング内容 */
.ranking-content {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  padding: 10px 4px 2px;
}

.ranking-content .brand-name {
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.2;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ranking-content .ranking-metric {
  font-size: 11px;
  color: var(--muted);
  font-weight: normal;
}

/* データなしカードのスタイル */
.no-data {
  opacity: 0.6;
  cursor: default;
}

.no-data:hover,
.no-data:focus {
  border-color: var(--border) !important;
  box-shadow: 0 8px 18px var(--shadow) !important;
  transform: none !important;
}

.no-data .brand-name {
  color: var(--muted);
  font-style: italic;
}

.no-results {
  font-style: italic;
  color: var(--muted);
}

/*--------------------- 「注目記事」セクション -----------------------*/
.column-subhead-row {
  display: flex;
  justify-content: flex-end;
}

.column-slider-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}
.slider-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.slider-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: scale(1.1);
}
.slider-btn:disabled {
  background: rgba(0, 0, 0, 0.25);
  cursor: not-allowed;
}
html[data-theme="E"] .slider-btn:disabled {
  background: rgba(255, 255, 255, 0.18);
}
.column-slider {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.column-grid {
  display: grid;
  margin: 12px 5px 0;
  grid-template-columns: 1fr;
  grid-template-rows: none;
  gap: 12px;
  transition: transform 0.3s ease;
}
.column-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--home-radius);
  overflow: hidden;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
  box-shadow: 0 8px 18px var(--shadow);
}
.column-card:hover {
  border-color: var(--accent);
  box-shadow:
    0 14px 26px var(--shadow),
    0 0 0 3px var(--accent-soft);
  transform: translateY(-2px);
}
.column-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  text-decoration: none;
  color: var(--text);
  height: 100%;
  min-height: 120px;
}
.column-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

/*================== もっと見る（詳細遷移の印象を強化） ==================*/
/* 共通スタイル: ボタン風＋矢印アニメーションで詳細感を演出 */
.ranking-more,
.column-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--accent);
  background: var(--surface-1);
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  position: relative;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    border-color 0.18s ease;
}

.ranking-more::after,
.column-more::after {
  content: "→";
  font-size: 0.95em;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
  opacity: 0.9;
}

.ranking-more:hover,
.ranking-more:focus,
.column-more:hover,
.column-more:focus {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-color: transparent;
  color: var(--accent-contrast);
  box-shadow: 0 14px 26px var(--shadow);
  transform: translateX(2px);
  text-decoration: none;
}

.ranking-more:hover::after,
.ranking-more:focus::after,
.column-more:hover::after,
.column-more:focus::after {
  transform: translateX(4px);
  opacity: 1;
}

.ranking-more:active,
.column-more:active {
  transform: translateX(0) translateY(0);
  box-shadow: 0 8px 16px var(--shadow);
}

.ranking-more:focus-visible,
.column-more:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px var(--accent-soft),
    0 0 0 1px var(--accent) inset;
}

@media (prefers-reduced-motion: reduce) {
  .ranking-more,
  .column-more,
  .ranking-more::after,
  .column-more::after {
    transition: none !important;
  }
}

/*--------------------- 「会員機能」セクション ------------------*/
.member-section {
  text-align: center;
}

.member-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 1200px;
  margin: 14px auto 0;
}

.member-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--home-radius);
  box-shadow: 0 10px 22px var(--shadow);
  padding: 16px 14px;
  text-align: left;
}

.member-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 18px;
  margin: 0 0 10px;
}

.member-card .member-title {
  margin: 0 0 6px;
  font-size: 16px;
}

.member-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.member-cta {
  margin-top: 16px;
}
.member-cta .btn {
  padding: 12px 20px;
  display: inline-block;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
}
.member-cta .btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--accent-contrast);
  border: 1px solid transparent;
  box-shadow: 0 10px 22px var(--shadow);
}
.member-cta .btn-primary:hover,
.member-cta .btn-primary:focus {
  filter: saturate(1.05);
  box-shadow: 0 14px 28px var(--shadow);
}

/* ===================- タブレット用（768px以上）======================== */
@media screen and (min-width: 768px) {
  .brand-cats {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 36px;
  }
  .brand-cats li a {
    height: 190px;
  }

  .ranking-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 24px;
  }
  .ranking-card {
    min-height: 210px;
  }

  .ranking-header h3 {
    font-size: 18px;
  }

  /* コラムのスライダーグリッドを3x2に */
  .column-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 16px;
  }

  .member-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .search-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

/* ======================= PC用（1024px以上）======================== */
@media screen and (min-width: 1024px) {
  /* 現状タブレットと同一。必要に応じてPC向け最適化を追加 */
}
