/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fafafa;
}

/* ===== Hero (메인 사진) ===== */
.hero {
  width: 100%;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.hero-link {
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.hero-inner {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img {
  max-width: 100%;
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ===== Nav Quick (인기/신규) ===== */
.nav-quick {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1rem 0.5rem;
  background: #fff;
}

.nav-quick-btn {
  position: relative;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid #e0d5ce;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #faf8f6 100%);
  color: #5d4e47;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.nav-quick-btn:hover {
  border-color: #8D6E63;
  color: #8D6E63;
  box-shadow: 0 2px 8px rgba(141, 110, 99, 0.15);
}

.nav-quick-btn.active {
  border-color: #8D6E63;
  background: linear-gradient(180deg, #f5f0ed 0%, #ebe5e0 100%);
  color: #5d4e47;
}

.nav-quick-sticker {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.nav-quick-sticker.hit {
  background: linear-gradient(135deg, #e53935, #c62828);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.nav-quick-sticker.new {
  background: linear-gradient(135deg, #43a047, #2e7d32);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ===== Nav (카테고리) ===== */
.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem 1rem;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.nav-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border: 1px solid #ddd;
  border-radius: 9999px;
  background: #fff;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn:hover {
  border-color: #8D6E63;
  color: #8D6E63;
}

.nav-btn.active {
  background: #8D6E63;
  border-color: #8D6E63;
  color: #fff;
}

/* ===== Main & Grid ===== */
.main {
  flex: 1;
  padding: 1.5rem 1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

/* ===== Card ===== */
.card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.card--hidden {
  display: none;
}

.card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  min-height: 0;
}

.card-image {
  aspect-ratio: 1.618 / 1;
  background: linear-gradient(135deg, #FDFCFB 0%, #E8E0DB 100%);
  overflow: hidden;
  flex-shrink: 0;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-image .card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 4rem;
  line-height: 1;
}

.card-label-wrap {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
}

.card-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.card-description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.8rem;
  color: #777;
  opacity: 0.9;
  line-height: 1.4;
  margin-bottom: 6px;
}

.card-cta {
  display: block;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.35);
  font-weight: 500;
}

.card:hover .card-cta {
  color: #8D6E63;
}

/* ===== Footer ===== */
.footer {
  padding: 1.5rem 1rem;
  background: #333;
  color: #aaa;
  text-align: center;
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.footer-links a {
  font-size: 0.75rem;
  color: #aaa;
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer p {
  margin-bottom: 0.25rem;
}

.footer p:last-child {
  margin-bottom: 0;
}

/* 로드 에러 */
.load-error {
  grid-column: 1 / -1;
  text-align: center;
  color: #999;
  padding: 2rem;
}
