/* ============================================================
   コスメ ブランド一覧 — PC用 CSS
   ============================================================ */

.cosme-wrap *,
.cosme-wrap *::before,
.cosme-wrap *::after { box-sizing: border-box; }

.cosme-wrap {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 0 40px;
}

.page-title {
  font-size: 24px;
  font-weight: bold;
  margin: 0 0 30px;
}

.sticky-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
}

.tabs {
  display: flex;
  gap: 6px;
  width: 100%;
  border-bottom: 0;
}
.tab {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 15px;
  font-weight: bold;
  color: #888;
  padding: 12px 28px;
  cursor: pointer;
  margin-bottom: 0;
  flex: 1 1 50%;
  text-align: center;
}
.tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #ddd;
}
.tab[aria-selected="true"] {
  color: #b81930;
}
.tab[aria-selected="true"]::after {
  height: 4px;
  background: #b81930;
}

.anchor-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 0;
  margin-bottom: 8px;
}
.anchor-pill {
  appearance: none;
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid #ccc;
  border-radius: 999px;
  background: #fff;
  color: #444;
  font-size: 13px;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.anchor-pill:hover {
  background: #f7f7f7;
  border-color: #999;
  color: #b81930;
}

.initial-group {
  font-size: 18px;
  font-weight: bold;
  color: #b81930;
  padding: 18px 0 8px;
  border-bottom: 1px solid #eee;
  margin: 10px 0 14px;
  scroll-margin-top: 100px;
}
.category-title {
  font-size: 17px;
  font-weight: bold;
  margin: 18px 0 16px;
  padding: 10px 14px;
  background: #fdeef0;
  border-left: 5px solid #b81930;
  scroll-margin-top: 130px;
}
.category-block { scroll-margin-top: 130px; }

.brand-grid,
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  justify-content: start;
  gap: 16px;
  padding-bottom: 20px;
}

.js-brandItem,
.category-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-decoration: none;
  color: #333;
}

.brand-thumb {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  min-height: 74px;
  border-radius: 4px;
  background: #fff;
}
.brand-thumb img {
  position: relative;
  z-index: -1;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}
.brand-thumb:after {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  content: "";
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
  border: solid 1px #cccccc;
  border-radius: 4px;
  overflow: hidden;
}

.brand-name {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 8px;
  color: #333;
  word-break: break-word;
}
.js-brandItem:hover .brand-thumb:after,
.category-card:hover .brand-thumb:after {
  border-color: #b81930;
}

.empty-msg { color: #999; padding: 24px 0; }

.top-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(40,40,40,.8);
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s;
  z-index: 50;
}
.top-btn.is-show { opacity: 1; visibility: visible; }
.top-btn:hover { background: rgba(20,20,20,.9); }

.panel { 
  display: none;
  padding: 0;
  overflow: hidden;
  border: none;
  background: none;
}
.panel.is-active { display: block; }

/* ---- カテゴリ下のリンク（新着商品/カテゴリ） ---- */
.cat-btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 36px;
  margin: 8px 0 24px;
  padding: 0;
}
.cat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #333;
  font-size: 13px;
  font-weight: bold;
  line-height: 1.4;
  text-decoration: none;
  text-align: left;
  transition: color .15s;
}
.cat-btn:hover {
  border-color: transparent;
  background: transparent;
  color: #b81930;
  text-decoration: none;
}
.cat-btn-label { flex: 0 0 auto; }
.cat-btn-arrow {
  flex: 0 0 auto;
  margin-left: 8px;
  color: #b81930;
  font-size: 16px;
  line-height: 1;
}
.cat-btn:hover .cat-btn-arrow { color: #b81930; }
