/* site.css — news + store pages, Minecraft Marketplace feel */

/* ── Page hero ─────────────────────────────────────────── */
.page-hero {
  padding: 36px 0 24px;
  margin-bottom: 28px;
}

.page-hero h2 {
  margin: 0 0 6px;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
}

/* ── Store hero (top of store listing) ─────────────────── */
.store-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 32px;
  min-height: 200px;
  background: linear-gradient(135deg, rgba(20,40,30,1) 0%, rgba(8,20,14,1) 100%);
  border: 1px solid rgba(74,222,128,0.14);
  display: flex;
  align-items: center;
  padding: 40px 36px;
  gap: 32px;
}

.store-hero-text h2 {
  font-size: 32px;
  font-weight: 900;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
}

.store-hero-text p {
  color: var(--muted);
  margin: 0 0 20px;
  font-size: 15px;
  max-width: 460px;
  line-height: 1.6;
}

.store-hero-text .badge-row {
  margin-bottom: 18px;
}

/* ── Toolbar / search bar ───────────────────────────────── */
.store-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.store-toolbar .search-wrap {
  flex: 1;
  min-width: 220px;
  position: relative;
}

.store-toolbar .search-wrap input {
  width: 100%;
  background: rgba(4,11,9,0.9);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  color: #e8fff6;
  padding: 12px 16px 12px 42px;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .18s;
  box-sizing: border-box;
}

.store-toolbar .search-wrap input:focus {
  border-color: rgba(74,222,128,0.38);
  box-shadow: 0 0 0 3px rgba(74,222,128,0.07);
}

.store-toolbar .search-wrap::before {
  content: '🔍';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}

.store-toolbar .page-info {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Login bar (top of store, compact) ─────────────────── */
.store-loginbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(10,22,16,0.7);
  border: 1px solid rgba(74,222,128,0.1);
  border-radius: 14px;
  padding: 13px 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.store-loginbar .loginbar-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.store-loginbar .loginbar-info strong {
  color: #7fffc0;
}

.store-loginbar .loginbar-actions {
  display: flex;
  gap: 8px;
}

/* ── Product card grid ──────────────────────────────────── */
.mp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ── Individual product card ────────────────────────────── */
.mp-card {
  background: rgba(10,20,15,0.95);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.mp-card:hover {
  transform: translateY(-4px);
  border-color: rgba(74,222,128,0.28);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(74,222,128,0.1);
}

.mp-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: rgba(255,255,255,0.04);
}

.mp-card-img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(20,35,25,1), rgba(8,16,12,1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.mp-card-body {
  padding: 13px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.mp-card-creator {
  font-size: 11px;
  font-weight: 700;
  color: #4ade80;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.mp-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #f0fff6;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mp-card-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}

.mp-card-footer {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.mp-card-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.mp-card-price {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(74,222,128,0.18), rgba(34,197,94,0.12));
  border: 1px solid rgba(74,222,128,0.2);
  color: #a7f3c4;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

/* ── Empty state ────────────────────────────────────────── */
.mp-empty {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}

.mp-empty h3 {
  font-size: 20px;
  margin: 0 0 8px;
  color: #e0f2ea;
}

/* ── Pagination ─────────────────────────────────────────── */
.mp-pagination {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* ── Product Detail Page ────────────────────────────────── */
.pdp-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #4ade80;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 22px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(74,222,128,0.07);
  border: 1px solid rgba(74,222,128,0.12);
  transition: background .15s;
}

.pdp-back:hover { background: rgba(74,222,128,0.13); }

.pdp-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

.pdp-gallery {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(8,16,12,1);
}

.pdp-gallery-main img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.pdp-gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
  background: rgba(4,10,7,0.8);
}

.pdp-gallery-thumbs button {
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  width: 80px;
  transition: border-color .15s;
}

.pdp-gallery-thumbs button:hover,
.pdp-gallery-thumbs button.active {
  border-color: rgba(74,222,128,0.5);
}

.pdp-gallery-thumbs button img {
  width: 80px;
  height: 50px;
  object-fit: cover;
  display: block;
}

.pdp-sidebar {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pdp-info-card {
  background: rgba(10,20,16,0.96);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 22px;
}

.pdp-creator {
  font-size: 12px;
  font-weight: 700;
  color: #4ade80;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.pdp-title {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.2;
}

.pdp-short-desc {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 16px;
  line-height: 1.6;
}

.pdp-price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.pdp-price {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(74,222,128,0.22), rgba(34,197,94,0.16));
  border: 1px solid rgba(74,222,128,0.25);
  color: #e0fff0;
  font-size: 20px;
  font-weight: 900;
}

.pdp-owned-badge {
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.22);
  color: #86efac;
  font-size: 12px;
  font-weight: 700;
}

.pdp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.pdp-rating {
  font-size: 13px;
  color: var(--muted);
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.pdp-description-card {
  background: rgba(10,20,16,0.96);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 22px;
}

.pdp-description-card h3 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
}

/* ── Rich content ───────────────────────────────────────── */
.rich-content {
  color: #d8f0e4;
  line-height: 1.75;
  font-size: 14px;
  word-break: break-word;
}

.rich-content strong { color: #fff; }
.rich-content em { color: #bff5d6; }

/* ── Reviews section ────────────────────────────────────── */
.reviews-section {
  margin-top: 28px;
}

.reviews-section h3 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 16px;
}

.review-form-card,
.comment-card {
  background: rgba(10,20,16,0.96);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 18px;
}

.review-form-card + *,
.comment-card + .comment-card {
  margin-top: 10px;
}

.rating-stars {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.rating-stars button {
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.04);
  color: #e0fff0;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
  transition: background .15s, border-color .15s;
}

.rating-stars button:hover { border-color: rgba(74,222,128,0.3); }

.rating-stars button.active {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: transparent;
  color: #052e16;
}

.comment-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

/* ── Panels (editor, forms) ─────────────────────────────── */
.panel {
  background: rgba(10,20,16,0.96);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.22);
}

.panel + .panel { margin-top: 16px; }
.panel h3, .panel h4 { margin-top: 0; }

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  color: #c8f0dc;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(4,11,9,0.85);
  color: #e8fff6;
  padding: 12px 13px;
  outline: none;
  font: inherit;
  font-size: 14px;
  transition: border-color .15s;
  box-sizing: border-box;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(74,222,128,0.38);
  box-shadow: 0 0 0 3px rgba(74,222,128,0.07);
}

.field textarea { min-height: 120px; resize: vertical; }
.field input[type="file"] { padding: 10px; }

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.notice {
  margin: 12px 0 0;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  color: #d6efe6;
  font-size: 13px;
}

.notice.good { border-color: rgba(74,222,128,0.22); }
.notice.bad  { border-color: rgba(248,113,113,0.22); }

/* ── News ───────────────────────────────────────────────── */
.cards-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.news-card {
  background: rgba(10,20,15,0.92);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
  transition: transform .18s, border-color .18s;
}

.news-card:hover {
  transform: translateY(-2px);
  border-color: rgba(74,222,128,0.2);
}

.news-card .inner { padding: 16px; }

.card-cover {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 16 / 7;
}

/* ── Shared badges / pills ──────────────────────────────── */
.badge-row, .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.16);
  color: #bff5d6;
  font-size: 11px;
  font-weight: 700;
}

.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ── Editor preview ─────────────────────────────────────── */
.editor-preview {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.07);
}

/* ── Shard currency icon ────────────────────────────────── */
.shard-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  image-rendering: pixelated;
  vertical-align: middle;
  flex-shrink: 0;
}

.mp-card-price .shard-icon { width: 13px; height: 13px; }
.pdp-price .shard-icon { width: 22px; height: 22px; }

/* ── Rich markup elements ────────────────────────────────── */
.markup-h {
  margin: 10px 0 4px;
  color: #f0fff8;
  font-weight: 800;
}
h3.markup-h { font-size: 17px; }
h4.markup-h { font-size: 15px; }
h5.markup-h { font-size: 13px; }

.markup-hr {
  border: none;
  border-top: 1px solid rgba(74,222,128,0.15);
  margin: 10px 0;
}

.markup-bq {
  border-left: 3px solid rgba(74,222,128,0.4);
  margin: 6px 0;
  padding: 4px 12px;
  color: #a0e8c4;
  font-style: italic;
}

.rich-content li {
  padding: 2px 0;
  color: #d8f0e4;
}

.rich-content li::before {
  content: '▸ ';
  color: #4ade80;
  font-size: 10px;
}

.inline-code {
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.18);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: monospace;
  font-size: 12px;
  color: #86efac;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .mp-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
  .mp-grid { grid-template-columns: repeat(2, 1fr); }
  .pdp-layout { grid-template-columns: 1fr; }
  .pdp-sidebar { position: static; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .cards-list { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .mp-grid { grid-template-columns: 1fr; }
}

/* Gift inbox / send flow */
.gift-form {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(6, 16, 11, 0.92);
  border: 1px solid rgba(74, 222, 128, 0.12);
}

.gift-form .field {
  margin-bottom: 10px;
}

.gift-form .field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}

.gift-form input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(4,11,9,0.95);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  color: #e8fff6;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.gift-form input:focus {
  border-color: rgba(74,222,128,0.38);
  box-shadow: 0 0 0 3px rgba(74,222,128,0.07);
}

.gift-status {
  margin-top: 10px;
  font-size: 13px;
}

.pdp-action-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.gift-card {
  background: rgba(10,20,15,0.95);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  min-height: 160px;
}

.gift-card.claimed {
  opacity: 0.72;
}

.gift-card-img,
.gift-card-img-placeholder {
  width: 180px;
  min-width: 180px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: rgba(255,255,255,0.04);
}

.gift-card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
}

.gift-card-body {
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.gift-card-meta {
  font-size: 12px;
  color: var(--muted);
}

.gift-card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.gift-card-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.gift-card-footer {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.gift-card-price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(74,222,128,0.18), rgba(34,197,94,0.12));
  border: 1px solid rgba(74,222,128,0.2);
  color: #a7f3c4;
  font-size: 12px;
  font-weight: 800;
}

.gift-empty {
  text-align: center;
}

.gift-empty h3 {
  margin-top: 0;
}

@media (max-width: 860px) {
  .gift-grid {
    grid-template-columns: 1fr;
  }

  .gift-card {
    flex-direction: column;
  }

  .gift-card-img,
  .gift-card-img-placeholder {
    width: 100%;
    min-width: 0;
  }
}
