/* ============================================================
   Tokens
   ============================================================ */
:root {
  --paper: #eef3fb;
  --card: #ffffff;
  --ink: #10233f;
  --ink-soft: #55688c;
  --rule: #cddcf2;
  --rule-soft: #e2ebfa;

  --accent: #1c5fd8;        /* Sonion blue */
  --accent-deep: #0d2f72;
  --accent-soft: #e6eefc;

  --available: #1f8a55;
  --sold: #8290a8;

  --font-brand: "Space Grotesk", "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --radius: 4px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  background-image: linear-gradient(var(--rule-soft) 1px, transparent 1px);
  background-size: 100% 2.1rem;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.5;
}

/* ============================================================
   Top contact bar — brand + Telegram, always visible up top
   ============================================================ */
.top-bar {
  background: var(--accent-deep);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.5rem;
  flex-wrap: wrap;
}

.top-bar .brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Replace this block's contents with <img src="logo.png" alt="Sonion logo">
   once you have a logo file next to this page. */
.logo-slot {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1.5px dashed rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.8);
}

.logo-slot img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.top-bar .shop-name {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.telegram-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--accent-deep);
  background: #fff;
  padding: 0.4rem 0.9rem 0.4rem 0.6rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.telegram-link svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: var(--accent);
}

.telegram-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  padding: 2.75rem 1.5rem 1.75rem;
  text-align: center;
  border-bottom: 3px double var(--ink);
  background: var(--paper);
}

.site-header .eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.site-header h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: 0;
  letter-spacing: -0.01em;
}

/* ============================================================
   Grid
   ============================================================ */
.catalog {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

/* ============================================================
   Card (index card, edge-to-edge photo)
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 470px;
  box-shadow: 2px 3px 0 rgba(16, 35, 63, 0.07);
}

.card-media {
  padding: 1.6rem 1.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 250px;
  flex: 0 0 250px;
  background: var(--card);
}

.card-media img,
.card-media .no-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 3px;
  background: var(--accent-soft);
  box-shadow: 0 3px 8px rgba(16, 35, 63, 0.12);
}

.card-media .no-image {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.85rem;
  padding: 0.5rem;
  line-height: 1.4;
}

/* Condition — a prominent labeled tag, not a tiny chip */
.condition-tag {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: var(--accent-soft);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.4rem 0.7rem;
  margin: 0;
}

.condition-tag .cond-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.condition-tag .cond-value {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-deep);
}

.condition-tag .cond-value small {
  font-weight: 500;
  font-size: 0.7rem;
  color: var(--ink-soft);
  margin-left: 0.25rem;
}

/* Status stamp, now sitting right beside the price */
.stamp {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border: 1.5px solid transparent;
  border-radius: 2px;
  color: #fff;
  transform: rotate(-4deg);
  white-space: nowrap;
}

.stamp.available { background: var(--available); }
.stamp.sold      { background: var(--sold); }

.card.is-sold .card-media img,
.card.is-sold .card-media .no-image {
  filter: grayscale(60%);
  opacity: 0.8;
}

.card-body {
  padding: 0.3rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1 1 auto;
  min-height: 0;
}

.condition-tag {
  flex: 0 0 auto;
}

.card-notes {
  font-size: 0.76rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.card-divider {
  border: none;
  border-top: 1px dashed var(--rule);
  margin: 0.1rem 0;
  flex: 0 0 auto;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 2.5rem;
  flex: 0 0 auto;
  font-family: var(--font-mono);
}

.price-row .prices {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1 1 auto;
  min-width: 0;
}

.price-row .original {
  color: var(--ink-soft);
  text-decoration: line-through;
  font-size: 0.76rem;
  white-space: nowrap;
}

.price-row .resell {
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  text-align: center;
  padding: 1.75rem 1rem 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule-soft);
}

/* ============================================================
   Responsive tweaks
   ============================================================ */
@media (max-width: 480px) {
  .top-bar { padding: 0.6rem 1rem; }
  .site-header { padding: 2rem 1rem 1.5rem; }
  .catalog { grid-template-columns: repeat(2, 1fr); gap: 0.9rem; padding: 1.5rem 0.9rem 3rem; }
  .card-body { padding: 0.65rem 0.75rem 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}