*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --black: #1a1a1a;
  --gray: #888;
  --light: #ccc;
  --border: #e8e8e8;
  --bg: #fff;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--black);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* --- Header --- */

header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 28px;
}

.logo {
  width: 140px;
  height: auto;
  display: block;
}

/* --- Filter (pill button + dropdown) --- */

.filter-wrap {
  position: relative;
}

.filter-btn {
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: none;
  color: var(--light);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-btn:hover {
  color: var(--gray);
  border-color: var(--light);
}

.filter-icon {
  color: var(--light);
  flex-shrink: 0;
}

.filter-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding: 6px;
  display: none;
  z-index: 20;
  min-width: 140px;
}

.filter-dropdown.open {
  display: block;
}

.filter-opt {
  display: block;
  width: 100%;
  font-family: var(--font);
  font-size: 13px;
  text-align: left;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--gray);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-opt:hover {
  background: #f5f5f5;
  color: var(--black);
}

.filter-opt.active {
  color: var(--black);
  font-weight: 500;
}

/* --- Grid --- */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 16px;
}

@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
}
@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
}

/* --- Product Card --- */

.card {
  display: block;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.4s ease forwards;
  cursor: pointer;
}

.card:hover .card-image img {
  transform: scale(1.03);
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.card-image {
  position: relative;
  aspect-ratio: 1;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.card-new {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--black);
  background: #fff;
  padding: 3px 8px;
  border-radius: 4px;
}

.card-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 2px;
}

.card-price {
  font-size: 13px;
  color: var(--gray);
}

/* --- Empty --- */

.empty {
  text-align: center;
  padding: 80px 24px;
  font-size: 14px;
  color: var(--light);
  display: none;
}
.empty.show { display: block; }

/* --- Detail View --- */

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
}

.detail-back {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--gray);
  cursor: pointer;
  transition: color 0.15s ease;
}
.detail-back:hover { color: var(--black); }

.logo-sm {
  width: 120px;
  height: auto;
}

.detail-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.detail-gallery {
  margin-bottom: 28px;
}

.detail-hero {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  display: block;
}

.detail-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.detail-thumbs::-webkit-scrollbar { display: none; }

.detail-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}
.detail-thumb:hover { opacity: 0.8; }
.detail-thumb.active { opacity: 1; }

.detail-info {
  padding: 0;
}

.detail-new {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--black);
  border: 1px solid var(--black);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.detail-title {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 6px;
}

.detail-price {
  font-size: 18px;
  color: var(--gray);
  margin-bottom: 16px;
}

.detail-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray);
  margin-bottom: 24px;
}

.detail-inquire {
  display: inline-block;
  font-family: var(--font);
  font-size: 14px;
  letter-spacing: 0.03em;
  padding: 12px 32px;
  border: 1px solid var(--black);
  border-radius: 100px;
  color: var(--black);
  text-decoration: none;
  transition: all 0.2s ease;
}
.detail-inquire:hover {
  background: var(--black);
  color: #fff;
}

.detail-id {
  margin-top: 32px;
  font-size: 11px;
  color: var(--light);
  letter-spacing: 0.02em;
}

/* --- Footer --- */

footer {
  padding: 0 24px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  padding: 48px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.footer-copy {
  font-size: 13px;
  color: var(--light);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 13px;
  color: var(--gray);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--black); }

/* --- Mobile --- */

@media (max-width: 559px) {
  header { padding: 24px 16px 20px; }
  .logo { width: 110px; }
  .filter-btn { font-size: 10px; padding: 6px 12px; }
  .filter-icon { width: 14px; height: 14px; }
  main { padding: 0 16px 60px; }
  .grid { gap: 20px 12px; }
  .card-title { font-size: 13px; }
  .card-price { font-size: 12px; }
  .detail-body { padding: 24px 20px 60px; }
  .detail-title { font-size: 20px; }
  .detail-price { font-size: 16px; }
  footer { padding: 0 16px; }
  .footer-inner { padding: 36px 0; }
  .footer-inner { gap: 16px; }
  .footer-copy { font-size: 11px; }
  .footer-links a { font-size: 11px; }
}
