/* Desktop: hide rank name spans (product cards are shown instead) */
.rank-name { display: none; }
.ranks-pro-ghost-card { display: none; }

/* Tablet and smaller: show products normally, table uses text headers */
@media (max-width: 960px) {
  .ranks-ghost-products {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    opacity: 1;
    pointer-events: auto;
    clip: auto;
    margin-bottom: 24px;
  }
  .ranks-table thead th .store-product-wrapper-wrapper {
    display: none !important;
  }
  .ranks-table thead tr.ranks-header {
    background-color: #EB73B0;
  }
  .ranks-table thead tr.ranks-header th {
    padding: 12px 8px;
  }
  .rank-name {
    display: block;
    font-family: 'Mac Minecraft', monospace;
    font-size: 0.95rem;
    color: #fff;
  }
  .ranks-pro-ghost-card { display: block; }
}

.ranks-table-wrap { overflow-x: auto; margin-top: 16px; }
.ranks-table {
  width: 100%;
  border-collapse: collapse;
  border: 4px solid #000;
  font-size: 0.9rem;
  color: #fff;
}
.ranks-table th, .ranks-table td {
  padding: 10px 8px;
  text-align: center;
  border: none;
  width: 18%;
}
.ranks-table td:first-child, .ranks-table th:first-child {
  width: 28%;
  max-width: none;
}
.ranks-table th:first-child,
.ranks-table td:first-child {
  text-align: left;
  font-weight: bold;
  white-space: nowrap;
}
.ranks-table thead tr.ranks-header {
  background-color: #1C1C1A;
  font-family: 'Mac Minecraft', monospace;
  font-size: 1rem;
}
/* Compact the Tebex product cards inside the header cells */
.ranks-table thead th .store-product-wrapper-wrapper,
.ranks-table thead th .store-product-wrapper {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.ranks-table thead th .store-product {
  background: none !important;
  padding: 8px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 2px;
}
.ranks-table thead th .image-link {
  display: block;
}
.ranks-table thead th .image,
.ranks-table thead th .image-default {
  width: 64px !important;
  height: 64px !important;
  max-width: 64px !important;
  max-height: 64px !important;
  object-fit: contain !important;
  image-rendering: pixelated;
  display: block;
  margin: 0 auto;
}
.ranks-table thead th .product-title {
  margin: 4px 0 0 !important;
  font-size: 0.95rem !important;
}
.ranks-table thead th .product-actions .price {
  font-size: 1.4rem !important;
  margin: 0 !important;
}
.ranks-table thead th .product-actions {
  background: none !important;
  padding: 4px 0 0 !important;
  width: 100%;
}
.ranks-table thead th .product-actions .btn-primary,
.ranks-table thead th .product-actions .btn-secondary,
.ranks-table thead th .product-actions .subscribe,
.ranks-table thead th .product-actions .add {
  width: 172px !important;
  box-sizing: border-box !important;
  display: block !important;
}
.ranks-table thead tr.ranks-header th {
  padding-bottom: 16px;
}
.ranks-table thead tr.ranks-separator td {
  background-color: #FFA6CE;
  height: 4px;
  padding: 0;
  border: none;
}
.ranks-table tbody tr:nth-child(odd)  { background-color: #2A2A2E; }
.ranks-table tbody tr:nth-child(even) { background-color: #34343A; }
.ranks-table tbody td {
  border-top: 2px solid #51525E;
  border-bottom: 2px solid #51525E;
}
.ranks-table tbody td:not(:first-child) {
  white-space: pre-line;
}
.ranks-table tbody tr.section-header td {
  background-color: #1a1a1e;
  font-family: 'Mac Minecraft', monospace;
  font-size: 0.8rem;
  color: #FFA6CE;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top: 2px solid #51525E;
  border-bottom: none;
}
.rank-type-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 3px;
  margin-top: 4px;
}
.rank-type-tiered  { background: #3A7ABF; }
.rank-type-sub     { background: #9D2E7C; }
.rank-buy-btn {
  display: inline-block;
  margin-top: 8px;
  background: #000;
  border: 4px solid #000;
  padding: 1px;
  cursor: pointer;
  text-decoration: none;
}
.rank-buy-btn-inner {
  background: #1D4D14;
  padding: 2px;
}
.rank-buy-btn span {
  display: block;
  background: #52A535;
  color: #fff;
  font-family: 'Mac Minecraft', monospace;
  font-size: 0.75rem;
  padding: 5px 12px;
  transition: background 0.15s;
}
.rank-buy-btn:hover span { background: #3C8526; }
.check { color: #6dd96d; font-size: 1.1rem; }
.cross { color: #d96d6d; font-size: 1.1rem; }

.back-to-ranks-wrap {
  margin-top: 24px;
  text-align: center;
}
.back-to-ranks-btn {
  display: inline-block;
}
