:root {
  --bg: #f7f2e9;
  --bg-alt: #efe5d4;
  --card: #fffdf8;
  --ink: #211d16;
  --ink-soft: #5b5546;
  --ink-faint: #8a8271;
  --accent: #9c6b2e;
  --accent-deep: #6e4a1c;
  --line: #e2d5bd;
  --line-soft: #ece3d1;
  --shadow: 0 1px 2px rgba(33,29,22,0.04), 0 8px 24px rgba(33,29,22,0.06);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: 24px;
}

h1, h2, h3, .logo {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}

em { font-style: italic; color: var(--accent-deep); }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 18px;
  gap: 16px;
  flex-wrap: wrap;
}
.header-left {
  display: flex;
  align-items: baseline;
  gap: 18px;
}
.logo {
  font-size: 22px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); font-style: italic; }
.logo.small { font-size: 18px; margin-bottom: 8px; }
.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--accent-deep); }
.nav-link.active { color: var(--accent-deep); border-color: var(--accent); }
.tagline {
  margin: 0;
  font-size: 13px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  border-bottom: 1px solid var(--line);
}
.hero-inner { padding-block: 56px 40px; }
.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  max-width: 16ch;
}
.hero-sub {
  margin-top: 18px;
  max-width: 62ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong {
  font-family: 'Fraunces', serif;
  font-size: 30px;
  color: var(--accent-deep);
}
.hero-stats span {
  font-size: 12.5px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Controls */
.controls { padding-block: 32px 8px; }
.search-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.search-box {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--ink-faint);
}
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--ink);
  width: 100%;
  font-family: inherit;
}
select {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  cursor: pointer;
}
#sort-select { flex: 0 0 auto; }

.filter-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: end;
  padding-block: 6px 4px;
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-group label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-faint);
}
.clear-btn {
  border: none;
  background: none;
  color: var(--accent-deep);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  padding: 11px 4px;
  font-family: inherit;
}
.clear-btn:hover { color: var(--accent); }

.result-count {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-faint);
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
  padding-block: 24px 60px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--line);
}
.card-img {
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
  overflow: hidden;
  position: relative;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(33,29,22,0.78);
  color: #fff;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 999px;
}
.card-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.card-vendor {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-deep);
  font-weight: 600;
}
.card-title {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 500;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  font-size: 13px;
  color: var(--ink-faint);
}
.card-price {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  color: var(--ink);
  font-weight: 600;
}

.empty-state {
  text-align: center;
  color: var(--ink-faint);
  padding-block: 60px;
  font-size: 15px;
}

/* Footer */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  padding-block: 40px;
}
.footer-inner p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 48ch;
}
.footer-links strong {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-block: 16px 24px;
  font-size: 12.5px;
  color: var(--ink-faint);
}
@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; padding-block: 32px 8px; }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(33,29,22,0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  z-index: 100;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--card);
  border-radius: 18px;
  max-width: 920px;
  width: 100%;
  position: relative;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
  z-index: 2;
}
.modal-close:hover { background: var(--bg-alt); }

.pd-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.pd-gallery-main {
  aspect-ratio: 1/1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-alt);
  margin-bottom: 10px;
}
.pd-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pd-thumbs img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.7;
}
.pd-thumbs img.active { border-color: var(--accent); opacity: 1; }

.pd-vendor {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-deep);
  font-weight: 600;
}
.pd-title {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  margin-top: 6px;
  line-height: 1.2;
}
.pd-price {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  margin-top: 12px;
  color: var(--ink);
}
.pd-price .strike {
  font-size: 15px;
  color: var(--ink-faint);
  text-decoration: line-through;
  margin-left: 8px;
}
.pd-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.pd-tag {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 5px 10px;
  border-radius: 999px;
}
.pd-desc {
  margin-top: 18px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-height: 220px;
  overflow-y: auto;
  padding-right: 6px;
}
.pd-shop-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  background: var(--ink);
  color: #fff;
  border: none;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.pd-shop-btn:hover { background: var(--accent-deep); }
.pd-disclosure {
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink-faint);
}

@media (max-width: 720px) {
  .pd-layout { grid-template-columns: 1fr; }
  .modal { padding: 22px; }
}

/* Feed page */
body.feed-page {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.feed-page .site-header { position: static; flex: 0 0 auto; }

.feed-viewport {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  background: #0b0a08;
  position: relative;
}
.feed-viewport::-webkit-scrollbar { display: none; }

.feed-loading {
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-family: 'Fraunces', serif;
  font-size: 18px;
  opacity: 0.7;
}

.feed-slide {
  height: 100%;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.feed-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.feed-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,7,5,0.92) 0%, rgba(8,7,5,0.55) 32%, rgba(8,7,5,0.05) 60%, rgba(8,7,5,0.35) 100%);
  z-index: 1;
}
.feed-hint {
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 2;
  color: rgba(255,255,255,0.7);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.feed-info {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 24px 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}
.feed-caption { color: #fff; max-width: 60ch; }
.feed-vendor-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.feed-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #1a1408;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 14px;
  flex: 0 0 auto;
}
.feed-vendor-name {
  font-size: 13.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #f1ead9;
}
.feed-origin-badge {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 2px 8px;
  border-radius: 999px;
}
.feed-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.25;
  margin: 0 0 6px;
  color: #fff;
}
.feed-title-link {
  color: inherit;
  text-decoration: none;
}
.feed-title-link:hover { text-decoration: underline; }
.feed-desc-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.feed-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255,255,255,0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.feed-desc.expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  max-height: 30vh;
  overflow-y: auto;
}
.feed-desc-toggle {
  flex: 0 0 auto;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}
.feed-desc-toggle:hover { background: rgba(255,255,255,0.3); }
.feed-desc-toggle[hidden] { display: none; }
.feed-price {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  color: #f1ead9;
  margin-top: 8px;
}

.feed-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.feed-get-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #1a1408;
  border: none;
  padding: 13px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.1s ease;
}
.feed-get-btn:hover { background: var(--accent); color: #1a1408; }
.feed-get-btn:active { transform: scale(0.96); }
.feed-get-btn.got {
  background: var(--accent-deep);
  color: #fff;
}
.feed-gotit-count {
  color: rgba(255,255,255,0.85);
  font-size: 12.5px;
  text-align: center;
}
.feed-gotit-count strong {
  color: #fff;
  font-family: 'Fraunces', serif;
  font-size: 15px;
  display: block;
}

.feed-nav-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: none;
}

@media (max-width: 640px) {
  .feed-info { flex-direction: column; align-items: flex-start; gap: 14px; }
  .feed-actions { flex-direction: row-reverse; width: 100%; justify-content: space-between; align-items: center; }
  .feed-gotit-count { text-align: left; }
}
