/* ============================================
   CHARAT makers.css — All Makers listing page
   Matches top.css ZINE collage style
   ============================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  color: #333;
}

body {
  background: #F5F3EF;
  font-family: 'Zen Maru Gothic', 'Helvetica Neue', Arial, sans-serif;
  padding-top: 50px;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

main {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* --- Section --- */
.section {
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid #333;
  padding-bottom: 0.4rem;
}

.section-label {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #333;
  line-height: 1;
}

.section-sub {
  font-size: 0.75rem;
  color: #999;
}

/* --- Category header --- */
.cat-header {
  font-size: 0.9rem;
  font-weight: 700;
  color: #333;
  letter-spacing: 0.08em;
  margin-bottom: 0.8rem;
  padding-left: 0.5rem;
  border-left: 4px solid #333;
}

/* --- Maker grid --- */
.maker-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem 0.8rem;
  padding: 0 0.5rem;
  margin-bottom: 2.5rem;
}

.maker-card {
  display: block;
  border: 2px solid #333;
  box-shadow: 3px 3px 0 #333;
  overflow: hidden;
  position: relative;
  background: #FFF;
  transition: transform 0.15s, box-shadow 0.15s;
}

.maker-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 #333;
  z-index: 2;
}

.maker-card:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #333;
}

.maker-thumb {
  width: 100%;
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  background-color: #EEE;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.maker-thumb img {
  height: 100%;
  object-fit: contain;
}

.maker-title {
  display: block;
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #333;
  border-top: 2px solid #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Back to Home --- */
.back-home {
  display: block;
  text-align: center;
  margin: 0 auto 2rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #333;
  letter-spacing: 0.08em;
  border: 2px solid #333;
  padding: 0.6rem 1.5rem;
  max-width: 280px;
  box-shadow: 3px 3px 0 #333;
  transition: transform 0.15s, box-shadow 0.15s;
}

.back-home:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 #333;
}

.back-home:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #333;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border: 2px solid #333;
  box-shadow: 3px 3px 0 #333;
  background: #FFF;
  color: #333;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.15s;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 #333;
}

.back-to-top:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #333;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 5px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #CCC;
}
::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .maker-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 0 0.2rem;
  }

  .maker-title {
    font-size: 0.65rem;
    padding: 0.25rem 0.4rem;
  }

  .section-label {
    font-size: 1.3rem;
  }
}

@media (min-width: 641px) and (max-width: 960px) {
  .maker-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
