/* Fashion hub + catalogue + shops — reuses style.css tokens. */

/* ---------- hub ---------- */
.fashion-hub { margin-top: .5rem; }
.fh-intro { margin-bottom: 1.4rem; }
.fh-title { font-size: 1.7rem; }
.fh-intro p { max-width: 60ch; color: var(--text-light); }
.fh-links { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.fh-links li { margin: .7rem 0; font-size: .92rem; color: var(--text-light); line-height: 1.5; }
.fh-links a { font-size: 1.05rem; font-weight: 700; color: var(--pink-dark); text-decoration: none; }
.fh-links a:hover { text-decoration: underline; }

.fh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.fh-card {
  position: relative; display: flex; flex-direction: column;
  padding: 1.1rem 1.1rem 1rem; border-radius: 16px;
  background: linear-gradient(180deg, #fffdf8, #fdf4e6);
  border: 2px solid var(--border); text-decoration: none; color: var(--text);
  box-shadow: 0 4px 14px var(--shadow); transition: transform .12s, border-color .15s, box-shadow .15s;
}
a.fh-card:hover { transform: translateY(-3px); border-color: var(--pink); box-shadow: 0 8px 20px var(--shadow); }
.fh-card-tag {
  align-self: flex-start; font-size: .68rem; padding: .1rem .5rem;
  border-radius: 999px; background: var(--pink-light); margin-bottom: .5rem;
}
.fh-card h3 { margin: 0 0 .4rem; font-family: 'Nunito', sans-serif; color: var(--pink-dark); }
.fh-card p { margin: 0 0 .8rem; font-size: .86rem; color: var(--text-light); flex: 1; }
.fh-go { font-size: .82rem; font-weight: 700; color: var(--pink); }
.fh-card-soon { opacity: .6; cursor: default; }
.fh-card-soon .fh-go { color: var(--text-light); }

/* ---------- catalogue ---------- */
.cat-head { margin-bottom: .8rem; }
.cat-title { font-size: 1.6rem; }
.cat-head p { color: var(--text-light); max-width: 62ch; }

.cat-toolbar {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  padding: .8rem; margin-bottom: .9rem; border-radius: 14px;
  background: var(--cream); border: 1.5px solid var(--border);
}
.cat-toolbar input, .cat-toolbar select {
  font-family: 'Nunito', sans-serif; font-size: .82rem;
  padding: .32rem .5rem; border: 1.5px solid var(--border);
  border-radius: 8px; background: var(--white); color: var(--text);
}
.cat-toolbar #cat-q { flex: 1 1 160px; }
.cat-count { margin-left: auto; font-size: .8rem; color: var(--text-light); white-space: nowrap; }
.cat-chiprow { display: flex; flex-wrap: wrap; gap: .4rem; width: 100%; }
.cat-chip {
  font-size: .76rem; padding: .22rem .6rem; border-radius: 999px; cursor: pointer;
  background: var(--white); border: 1.5px solid var(--border); color: var(--text-light);
}
.cat-chip.on { background: var(--gold-light); border-color: var(--gold); color: var(--gold-dark); font-weight: 700; }

.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: .7rem;
}
.cat-item {
  display: flex; flex-direction: column; gap: .3rem; padding: .6rem .6rem .7rem;
  background: var(--white); border: 1.5px solid var(--border); border-radius: 13px;
  box-shadow: 0 2px 8px var(--shadow); scroll-margin-top: 84px;
}
/* deep-linked-from-the-simulator highlight pulse */
.cat-item.cat-hit { animation: cat-hit 1.3s ease 2; }
@keyframes cat-hit {
  0%, 100% { box-shadow: 0 2px 8px var(--shadow); border-color: var(--border); }
  50% { box-shadow: 0 0 0 3px var(--pink), 0 4px 14px var(--shadow); border-color: var(--pink); }
}
.cat-item-top { display: flex; gap: .5rem; align-items: flex-start; }
.cat-thumb { width: 58px; height: 58px; flex: none; display: flex; align-items: center; justify-content: center; }
.cat-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cat-noicon {
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  border: 1.5px dashed var(--border); border-radius: 8px;
  font-size: .56rem; color: var(--text-light); text-align: center;
}
.cat-noattr { font-size: .68rem; color: var(--text-light); font-style: italic; padding: .1rem 0; }
.cat-id { flex: 1; min-width: 0; }
.cat-name { font-size: .82rem; font-weight: 700; line-height: 1.15; }
.cat-kind { font-size: .7rem; color: var(--text-light); display: flex; align-items: center; gap: .25rem; margin-top: .15rem; }
.cat-sw { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); flex: none; }

.cat-attrs { display: flex; gap: 3px; align-items: flex-end; padding-top: .15rem; }
.cat-attr { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cat-attr-n { font-size: .64rem; font-weight: 700; color: var(--text-light); line-height: 1; font-variant-numeric: tabular-nums; }
.cat-bar { width: 10px; height: 30px; background: #e7ddd0; border-radius: 3px; display: flex; align-items: flex-end; overflow: hidden; box-shadow: inset 0 1px 2px rgba(120,90,50,.18); }
.cat-bar-f { width: 100%; background: var(--ac); border-radius: 3px; min-height: 0; transition: height .2s; }
.cat-attr-l { font-size: .55rem; color: var(--text-light); }
.cat-attr.peak .cat-attr-n { color: var(--text); }
.cat-attr.peak .cat-bar { box-shadow: inset 0 1px 2px rgba(120,90,50,.18), 0 0 0 1.5px var(--ac); }

.cat-meta { display: flex; flex-wrap: wrap; gap: .25rem .5rem; font-size: .7rem; color: var(--text-light); }
.cat-meta .price { font-weight: 700; color: var(--gold-dark); }
.cat-meta .warm::before { content: "☼ "; color: var(--purple); }

.cat-tags { display: flex; flex-wrap: wrap; gap: .25rem; }
.cat-tag { font-size: .62rem; padding: .05rem .4rem; border-radius: 6px; font-weight: 700; }
.cat-tag.shop { background: var(--pink-light); color: var(--pink-dark); }
.cat-tag.avail { background: #eef3e0; color: #5f7a32; }
.cat-tag.gift { background: #fde7f0; color: #c03b6e; }
.cat-tag.pair { background: #e9e3ff; color: #6b54c0; }
.cat-tag.dlc { background: #fff0d8; color: #b3782a; }
.cat-tag.special { background: #efe9f5; color: #7a6aa0; }

.cat-empty { padding: 2rem; text-align: center; color: var(--text-light); }

/* ---------- shops (article + bookmarks) ---------- */
.fashion-shops { margin-top: .5rem; }
.shop-bookmarks {
  display: flex; flex-wrap: wrap; gap: .35rem;
  margin: 0 0 1.3rem; padding-bottom: 1rem; border-bottom: 1.5px dashed var(--border);
}
.shop-bookmarks a {
  font-size: .76rem; font-weight: 700; text-decoration: none;
  padding: .22rem .6rem; border-radius: 999px;
  background: var(--cream); border: 1.5px solid var(--border); color: var(--text-light);
}
.shop-bookmarks a:hover { border-color: var(--pink); color: var(--pink-dark); }

.shop-section { scroll-margin-top: 80px; }
.shop-meta { margin: .1rem 0 .55rem; font-size: .82rem; color: var(--text-light); }
.shop-facts { list-style: none; padding: 0; margin: 0 0 .7rem; font-size: .9rem; }
.shop-facts li { position: relative; padding-left: 1.7em; margin: .35rem 0; line-height: 1.4; }
.shop-facts li::before { position: absolute; left: 0; top: 0; }
.shop-facts .open::before    { content: "🕑"; }
.shop-facts .bargain::before { content: "🏷️"; }
.shop-facts .bargain { color: #b3402a; }
.shop-facts .card::before    { content: "💳"; }
.shop-facts .used::before    { content: "♻️"; }
.shop-facts b { color: var(--text); margin-right: .15rem; }
.shop-browse { font-size: .86rem; font-weight: 700; color: var(--pink); text-decoration: none; }
.shop-browse:hover { color: var(--pink-dark); text-decoration: underline; }

/* ---------- appearance modes ---------- */
html[data-theme="dark"] .fh-card,
html[data-theme="dark"] .cat-item {
  background: linear-gradient(180deg, color-mix(in srgb, var(--white) 86%, var(--cream)), var(--white));
}

html[data-theme="dark"] .cat-toolbar,
html[data-theme="dark"] .fashion-subnav a,
html[data-theme="dark"] .shop-bookmarks a {
  background: var(--white);
}

html[data-theme="dark"] .cat-toolbar input,
html[data-theme="dark"] .cat-toolbar select,
html[data-theme="dark"] .cat-chip {
  background: var(--cream);
  color: var(--text);
}

html[data-theme="dark"] .cat-bar {
  background: #3c332d;
}

html[data-theme="dark"] .cat-tag.avail { background: #263723; color: #b8e59b; }
html[data-theme="dark"] .cat-tag.gift { background: #3a2230; color: #ffadc8; }
html[data-theme="dark"] .cat-tag.pair { background: #28243e; color: #c8bdff; }
html[data-theme="dark"] .cat-tag.dlc { background: #3a2c1c; color: #f0cd83; }
html[data-theme="dark"] .cat-tag.special { background: #2e2936; color: #d8c8ee; }

/* ---------- mobile ---------- */
@media (max-width: 768px) {
  .fashion-hub,
  .fashion-shops {
    margin-top: 0;
  }

  .fh-intro,
  .cat-head {
    margin-bottom: 1rem;
  }

  .fh-title,
  .cat-title {
    font-size: 1.3rem;
  }

  .fh-grid {
    grid-template-columns: 1fr;
    gap: .75rem;
  }

  .fh-card {
    padding: .9rem;
    border-radius: 10px;
  }

  .fashion-subnav,
  .shop-bookmarks {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: .35rem;
    padding-bottom: .45rem;
    scrollbar-width: thin;
  }

  .fashion-subnav a,
  .shop-bookmarks a {
    flex: 0 0 auto;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: .42rem .78rem;
  }

  .cat-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
    padding: .7rem;
    border-radius: 10px;
  }

  .cat-toolbar #cat-q,
  .cat-chiprow,
  .cat-count {
    grid-column: 1 / -1;
  }

  .cat-toolbar input,
  .cat-toolbar select {
    width: 100%;
    min-height: 38px;
    font-size: .86rem;
  }

  .cat-count {
    margin-left: 0;
  }

  .cat-chiprow {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .cat-chip {
    flex: 0 0 auto;
    min-height: 34px;
    padding: .38rem .68rem;
  }

  .cat-grid {
    grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
    gap: .55rem;
  }

  .cat-item {
    border-radius: 10px;
    padding: .55rem;
  }

  .cat-item-top {
    gap: .4rem;
  }

  .cat-thumb,
  .cat-noicon {
    width: 52px;
    height: 52px;
  }

  .cat-name {
    font-size: .8rem;
    line-height: 1.22;
  }

  .cat-attr-l {
    font-size: .5rem;
  }

  .shop-section {
    scroll-margin-top: 20px;
    padding-top: .25rem;
    margin-top: 1.2rem;
  }

  .shop-facts li {
    margin: .48rem 0;
  }
}

@media (max-width: 430px) {
  .cat-toolbar {
    grid-template-columns: 1fr;
  }

  .cat-grid {
    grid-template-columns: 1fr;
  }

  .cat-item {
    gap: .45rem;
  }

  .cat-thumb,
  .cat-noicon {
    width: 60px;
    height: 60px;
  }
}
