/* =========================================
   Breadcrumbs / Home link
   ========================================= */
.crumbs {
  margin:10px 0 6px;
  text-align:left;
}

.home-link {
  color:var(--link);
  text-decoration:none;
  font-weight:800;
  display:inline-block;
}

.home-link:focus-visible {
  outline:2px solid var(--link);
  outline-offset:3px;
  border-radius:8px;
}

/* Make home link visually as large as the item title */
.home-big {
  font-size:clamp(22px, 3.8vw, 34px);
  letter-spacing:0.2px;
}

/* =========================================
   Item header
   ========================================= */
.item-title {
  margin:10px 0 6px 0;
  font-size:clamp(22px, 3.8vw, 34px);
  letter-spacing:0.2px;
  text-align:center;
}

.item-subtitle {
  margin:0 0 12px 0;
  text-align:center;
  color:var(--muted);
  font-weight:600; /* match the feel of requirement text */
  font-size:16px;
}

/* =========================================
   Hero
   ========================================= */
.item-hero {
  margin:14px 0 14px 0;
  display:flex;
  justify-content:center;
}

.item-hero img {
  width:200px;
  height:200px;
  object-fit:contain;
  border-radius:var(--radius);
  border:1px solid var(--border);
  background:var(--card); /* visible behind alpha */
  cursor:zoom-in;
}

/* =========================================
   Primary description (no box, centered)
   ========================================= */
.item-desc-wrap {
  display:flex;
  justify-content:center;
  margin-bottom:20px;
}

.item-desc {
  max-width:720px;
  text-align:center;
  margin:8px 16px 18px;
  color:var(--text);
}

/* =========================================
   Secondary Details (boxed)
   ========================================= */
.details-block {
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  margin-bottom:12px;
}

.details-title {
  margin:0 0 6px 0;
  font-size:20px;
}

.details-text {
  margin:0;
  color:var(--muted);
}

/* =========================================
   Section block (generic)
   ========================================= */
.section-block {
  background:var(--section-bg);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px;
}

.section-block.is-clear {
  --section-bg:transparent;
  border:0;
}

.section-block h2 {
  margin:0 0 12px 0;
  font-size:20px;
}

.section-block + .section-block {
  margin-top:12px;
}

.section-block.is-clear + .section-block.is-clear {
  margin-top:0;
}

/* =========================================
   Location grid (Where to find)
   ========================================= */
.loc-grid {
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

@media (min-width:700px) {
  .loc-grid {
    grid-template-columns:1fr 1fr;
  }
}

.loc-card {
  display:flex;
  flex-direction:column;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
}

.loc-body {
  padding:12px;
}

.loc-title {
  margin:0 0 6px 0;
  font-size:18px;
}

.loc-desc {
  margin:0 0 8px 0;
  color:var(--muted);
}

/* Image as last element */
.loc-media img {
  width:100%;
  height:auto;
  display:block;
  cursor:zoom-in;
}

/* =========================================
   Inline links that match surrounding text
   ========================================= */
.inline-link {
  color:inherit;
  text-decoration:underline;
  text-underline-offset:2px;
}

.inline-link:hover,
.inline-link:focus {
  text-decoration-thickness:2px;
}

.inline-link:visited {
  color:inherit;
}

/* =========================================
   Icon gallery (Variants, Achievements)
   ========================================= */
/* Gallery container: flow cards left-to-right, wrap to next line when needed */
.icon-grid {
  display:flex;
  flex-wrap:wrap;
  gap:1rem;
  align-items:flex-start; /* cards align to top when wrapping */
}

/* Card: fixed width, so the label wraps within that width */
.icon-card {
  width:125px;
  max-width:125px;
  flex:0 0 125px; /* do not grow/shrink; stay 125px wide */
  text-align:center; /* center the label under the image */
}

/* Keep the image at correct size and nicely centered */
.icon-media {
  width:125px;
  height:125px;
  border-radius:9999px;
  background:var(--card);
  border:1px solid var(--border);
  margin:0;
}

/* Label wraps within correct width; centered text; good line-height for multi-line names */
.icon-label {
  margin-top:18px;
  line-height:1.25;
  text-align:center;
  word-break:break-word;  /* allow wrapping mid-word if necessary */
  overflow-wrap:anywhere;
}

/* =========================================
   Inventory grid (new)
   ========================================= */
.inventory-grid {
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

@media (min-width:700px) {
  .inventory-grid {
    grid-template-columns:1fr 1fr;
  }
}

.inventory-card {
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:12px;
}

/* Row 1: image + name/cost */
.inventory-row-primary {
  display:flex;
  gap:12px;
  align-items:center;
}

.inventory-media {
  width:80px;
  height:80px;
  border-radius:var(--radius);
  background:#161920; /* slightly lighter than --card */
  flex-shrink:0;
  overflow:hidden;
}

.inventory-media img {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.inventory-main {
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.inventory-name {
  margin:0 0 4px 0;
  font-size:16px;
  font-weight:600;
  color:var(--text);
}

.inventory-cost {
  margin:0;
  font-size:14px;
  color:var(--text);
}

/* Row 2: italic description, extra horizontal padding */
.inventory-desc {
  margin:8px 0 0 0;
  padding:0 16px;
  font-style:italic;
  color:var(--muted);
}

/* Row 3: additional description, aligned with image edge (no extra padding) */
.inventory-extra {
  margin:6px 0 0 0;
  color:var(--muted);
}
