/*=================== 酒類トップ(/brand/list.html) =====================*/
/* ====== グループ切替ボタン（7個） ====== */
.group-switch {
  display: flex;
  gap: 15px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  margin: 10px 5px;
  padding: 5px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.group-switch-btn {
  min-width: 65px;
  min-height: 65px;
  border-radius: 999px;
  border: 1px solid var(--border, #e2e2e2);
  background: var(--surface-1, #fff);
  color: var(--text, #333);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 8px var(--shadow, rgba(0, 0, 0, 0.06));
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.group-switch-btn i {
  font-size: 22px;
  line-height: 1;
}

.group-switch-label {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.group-switch-btn:hover {
  background: var(--surface-2, #f5f5f5);
  transform: translateY(-1px);
}

.group-switch-btn:focus-visible {
  outline: 2px solid var(--focus-ring, rgba(0, 112, 243, 0.5));
  outline-offset: 2px;
}

.group-switch-btn.is-active {
  border-color: var(--accent, #0070f3);
  box-shadow: 0 0 0 3px var(--focus-ring, rgba(0, 112, 243, 0.12));
}

.group-switch-btn.is-disabled,
.group-switch-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.group-view {
  display: none;
}
.group-view.is-active {
  display: block;
}

.group-view-note {
  padding: 14px 16px;
  background: var(--accent-soft, #fff8e1);
  border: 1px solid var(--border, #ffe6a3);
  border-radius: 8px;
  color: var(--text, #7a5a00);
}

.group-footer {
  padding-top: 10px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.group-more-btn,
.group-collapse-btn {
  background: var(--surface-2, #f5f5f5);
  color: var(--text, #333);
  border: 1px solid var(--border, #ddd);
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.group-more-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ====== グループ表示（国/度数/容量/タグ…共通） ====== */
.group-item {
  margin-bottom: 24px;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-1, #fff);
  box-shadow: 0 4px 14px var(--shadow, rgba(0, 0, 0, 0.1));
}

.group-item.is-disabled,
.group-item[aria-disabled="true"] {
  opacity: 0.45;
}

.group-item.is-disabled,
.group-item[aria-disabled="true"] {
  pointer-events: none;
}

.group-item.is-disabled > .group-header,
.group-item[aria-disabled="true"] > .group-header {
  cursor: not-allowed;
}
.group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface-2, #f5f5f5);
  border-bottom: 1px solid var(--border, #e5e5e5);
  cursor: pointer;
  user-select: none;
}
.group-header:hover {
  background: var(--surface-2, #e8e8e8);
}
.group-header:focus-visible {
  outline: 2px solid var(--focus-ring, rgba(0, 112, 243, 0.5));
  outline-offset: -2px;
}
.group-toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
}
.group-toggle::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 18px solid var(--muted, #666);
  transition: transform 0.2s ease;
}
.group-item.open > .group-header .group-toggle::before {
  transform: rotate(180deg);
}
.group-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #333);
}
.group-brands {
  display: none;
  padding: 16px;
}
.group-item.open > .group-brands {
  display: block;
}

/* ====== ウイスキー(country) 二段アコーディオン ====== */
.group-item--major > .group-header {
  background: var(--topbar-bg-2, var(--topbar-bg-1, var(--surface-2, #f5f5f5)));
}

.group-item--major > .group-header:hover {
  background: var(--topbar-bg-2, var(--topbar-bg-1, var(--surface-2, #f5f5f5)));
}

.group-item--major > .group-brands {
  padding: 12px;
}

.whiskey-region-list {
  display: grid;
  gap: 12px;
}

.group-item--nested {
  margin-bottom: 0;
  box-shadow: none;
}

.group-item--nested .group-header {
  padding: 0px 10px;
}

.group-item--nested .group-title {
  font-size: 14px;
  line-height: 1;
}

.group-item--nested .group-toggle {
  width: 26px;
  height: 26px;
}

.group-item--nested .group-toggle::before {
  content: "+";
  border: 0;
  width: auto;
  height: auto;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  color: var(--muted, #666);
  transform: none;
  transition: none;
}

.group-item--nested.open > .group-header .group-toggle::before {
  content: "−";
  transform: none;
}

.group-item--nested .group-brands {
  padding: 12px;
}

/* ====== アコーディオン内：カード（常に3列） ====== */
.group-brand-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.brand-card {
  position: relative;
  border: 1px solid var(--border, #ddd);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-1, #fff);
  box-shadow: 0 2px 8px var(--shadow, rgba(0, 0, 0, 0.08));
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.brand-card:hover,
.brand-card:focus-within {
  transform: translateY(-2px);
  border-color: var(--accent, #0070f3);
  box-shadow: 0 8px 18px var(--shadow, rgba(0, 0, 0, 0.18));
}

/* カード全体クリック用（ボタンはz-indexで上に出す） */
.brand-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-decoration: none;
  color: inherit;
}

.brand-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-2, #f5f5f5);
}

.brand-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.2s ease;
}

.brand-card:hover .brand-card-img,
.brand-card:focus-within .brand-card-img {
  filter: brightness(0.98);
}

.brand-card-name {
  padding: 10px 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text, #333);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.25em * 2);
}

.brand-card-actions {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.brand-card-actions form {
  display: inline-block;
}

.brand-card-actions .icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
/* アイコンボタン（検索・詳細に合わせる） */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e2e2);
  background: var(--surface-1, #fff);
  color: var(--text, #333);
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 8px var(--shadow, rgba(0, 0, 0, 0.06));
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}
.icon-btn:hover {
  background: var(--surface-2, #f5f5f5);
  transform: translateY(-1px);
}
.icon-btn:focus-visible {
  outline: 2px solid var(--focus-ring, rgba(0, 112, 243, 0.5));
  outline-offset: 2px;
}
.icon-btn i {
  font-size: 18px;
  line-height: 1;
}
.icon-btn--heart i {
  color: #cc3055;
}
/* 比較アイコンは選択不可 + アクティブ時はアイコンのみ色変更 */
.icon-btn--compare {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}
.icon-btn--compare.is-active {
  background: var(--surface-1, #fff);
  border-color: var(--border, #e2e2e2);
  box-shadow: none;
  color: inherit;
}
.icon-btn--compare.is-active i {
  color: var(--accent, #1463c4);
}

/* 詳細検索ボタン */
.advanced-search-section {
  text-align: center;
  margin: 40px auto 60px;
  padding: 30px 20px;
  max-width: 500px;
}
.advanced-search-btn {
  display: inline-block;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--accent, #0070f3) 0%, var(--accent-hover, #0056b3) 100%);
  color: var(--accent-contrast, #fff);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 10px 24px var(--shadow, rgba(0, 0, 0, 0.22));
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
}
.advanced-search-btn:before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
}
.advanced-search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px var(--shadow, rgba(0, 0, 0, 0.28));
  color: var(--accent-contrast, #fff);
  text-decoration: none;
}
.advanced-search-btn:hover:before {
  left: 100%;
}
.advanced-search-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px var(--shadow, rgba(0, 0, 0, 0.22));
}
.advanced-search-btn:focus-visible {
  outline: 2px solid var(--focus-ring, rgba(0, 112, 243, 0.5));
  outline-offset: 2px;
}

/*=================== 銘柄詳細説明領域 =====================*/
.brand-description-section {
  margin-top: 40px;
  padding: 30px 0 50px;
  background: var(--surface-2, #fafafa);
  border-top: 1px solid var(--border, #e5e5e5);
}
.brand-description-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}
.brand-description-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 24px;
  color: var(--text, #333);
  border-bottom: 2px solid var(--accent, #0070f3);
  padding-bottom: 8px;
}
.brand-description-content {
  background: var(--surface-1, #fff);
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 6px 18px var(--shadow, rgba(0, 0, 0, 0.12));
}
.brand-description-placeholder {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted, #666);
  text-align: center;
  margin: 0 0 24px;
  padding: 16px;
  background: var(--surface-2, #f8f9fa);
  border: 1px dashed var(--border, #ccc);
  border-radius: 6px;
}
.brand-description-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.feature-item {
  background: var(--surface-2, #f8f9fa);
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 6px;
  padding: 16px;
  text-align: center;
}
.feature-item h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--accent, #0070f3);
}
.feature-item p {
  font-size: 14px;
  color: var(--muted, #666);
  margin: 0;
  line-height: 1.4;
}

/* タブレット画面用 */
@media screen and (min-width: 768px) {
  .group-switch {
    justify-content: center;
    gap: 20px;
  }
  .group-switch-btn {
    min-width: 70px;
    min-height: 70px;
  }
}

/* PC画面用 */
@media screen and (min-width: 1024px) {
  .group-switch-btn {
    min-width: 76px;
    min-height: 76px;
  }
}
