﻿
:root {
  --bg: #f5f7fb;
  --canvas: #ffffff;
  --ink: #121417;
  --muted: #5a6570;
  --line: #e4e8ee;
  --accent: #0064ff;
  --accent-ink: #ffffff;
  --rose-bg: #fce8ec;
  --rose-ink: #8a1f3a;
  --radius: 16px;
  --font: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
*,
*::before,
*::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(1200px 420px at 50% -90px, rgba(0, 100, 255, 0.07), transparent 70%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.disclosure {
  margin: 0;
  padding: 12px 16px;
  background: var(--rose-bg);
  color: var(--rose-ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.skip {
  position: absolute;
  left: 12px;
  top: -100px;
}
.skip:focus {
  top: 8px;
  background: var(--canvas);
  padding: 10px;
  z-index: 2;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--accent);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
}
header span {
  font-size: 13px;
  color: var(--muted);
}
main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 16px 56px;
}
.catalog-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: baseline;
  margin: 0 0 18px;
}
.catalog-heading h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.02em;
}
.catalog-heading p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 200px) minmax(120px, 200px);
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}
.controls input,
.controls select {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
}
#result-count {
  min-height: 24px;
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px 16px;
  align-items: stretch;
}
.grid article { min-width: 0; }
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.photo {
  aspect-ratio: 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}
.photo.missing {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 16px;
  background: #eef1f6;
}
.card-copy {
  padding: 14px 14px 8px;
  flex: 1;
  min-width: 0;
}
.list-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  margin: 0 6px 6px 0;
  border-radius: 8px;
  background: #eef4ff;
  color: #1a3f8a;
  font-size: 13px;
  font-weight: 700;
}
.category-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #3a4d6b;
  background: #eef3fb;
  border-radius: 999px;
  padding: 3px 8px;
  margin-bottom: 6px;
}
.card h2 {
  margin: 6px 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.card p,
.card .price {
  margin: 6px 0;
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.card .price {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}
.card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 14px 14px;
}
.buy,
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.buy {
  background: var(--accent);
  color: var(--accent-ink);
}
.buy:hover { background: #0052d6; }
.detail-link,
.cta {
  color: #414e60;
  background: #f3f6fb;
}
#pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}
#pagination a,
#pagination button {
  min-height: 44px;
  min-width: 44px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  background: #fff;
  padding: 10px 18px;
  cursor: pointer;
}
#pagination span { font-size: 14px; }
.empty {
  grid-column: 1 / -1;
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
}
.back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  color: var(--accent);
  font-weight: 700;
}
.detail {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(260px, 1fr);
  gap: 36px;
  max-width: 1100px;
  margin: 20px auto 0;
}
.detail .photo {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.detail section { min-width: 0; }
.detail h1 {
  margin: 8px 0 12px;
  font-size: 28px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.detail .price {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 800;
}
.detail .purchase-note,
.affiliate-note {
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.detail .buy {
  display: inline-flex;
  margin: 16px 0 8px;
  padding: 12px 20px;
}
footer {
  border-top: 1px solid var(--line);
  padding: 24px 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 1199px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
  .controls { grid-template-columns: 1fr 1fr; }
  .controls label:first-child { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  header span { display: none; }
  main { padding: 16px 14px 48px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .detail h1 { font-size: 24px; }
  .catalog-heading h1 { font-size: 22px; }
}
@media (max-width: 389px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  main { padding: 14px 12px 40px; }
  .disclosure { padding: 10px 12px; }
}

