/* ── Landing page ── */
.landing-hero {
  text-align: center;
  padding: 2.5rem 0 2rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  padding-bottom: 2.5rem;
}

.category-tile {
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: block;
  background: #fff;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  color: inherit;
}

.category-tile--soon {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

.cat-img {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* To use a real photo: add background-image: url(...); background-size: cover; */
}

.cat-img img {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.cat-soon-ribbon {
  position: absolute;
  top: 12px;
  right: -24px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 3px 28px;
  transform: rotate(35deg);
  transform-origin: top right;
}

.cat-body {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 3px solid rgba(0, 0, 0, 0.06);
}

.cat-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a237e;
  margin-bottom: 0.2rem;
}

.cat-desc {
  font-size: 0.82rem;
  color: #666;
}

.cat-count {
  font-size: 0.78rem;
  color: #1565c0;
  font-weight: 500;
}

/* ── Site nav ── */
.site-nav {
  background: linear-gradient(135deg, #0d47a1 0%, #1565c0 60%, #1976d2 100%);
  box-shadow: 0 2px 8px rgba(13, 71, 161, 0.35);
}

/* ── Affiliate disclosure bar ── */
.affiliate-disclosure {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  padding: 2px 0 4px;
  line-height: 1.3;
}

/* ── Filter + sort controls ── */
.controls-bar {
  background: #fff;
  border: 1px solid #c8d9f5;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 1px 3px rgba(25, 118, 210, 0.07);
}

.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* Active type tab — blue instead of dark */
.btn-filter-active {
  background-color: #1565c0;
  border-color: #1565c0;
  color: #fff;
}
.btn-filter-active:hover {
  background-color: #0d47a1;
  border-color: #0d47a1;
  color: #fff;
}

/* ── Per-variant thumbnail ── */
.variant-thumb {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 3px;
  background: #f8f9fa;
  flex-shrink: 0;
}

.variant-thumb-placeholder {
  width: 30px;
  height: 30px;
  background: #e8f0fe;
  border-radius: 3px;
  flex-shrink: 0;
}

.x-small {
  font-size: 0.78rem;
}

/* ── Variant list ── */
.variant-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}


.variant-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 5px;
  border-radius: 5px;
  flex-wrap: wrap;
}

.variant-row:hover {
  background-color: #f0f5ff;
}

.variant-deal {
  background-color: rgba(255, 193, 7, 0.1);
}

.variant-deal:hover {
  background-color: rgba(255, 193, 7, 0.18);
}

.variant-color {
  min-width: 110px;
  font-size: 0.875rem;
}

.variant-price {
  min-width: 55px;
  font-weight: 600;
  font-size: 0.925rem;
  color: #1a237e;
}

.variant-ppkg {
  min-width: 75px;
  font-size: 0.8rem;
}

.group-rating {
  font-size: 0.75rem;
  white-space: nowrap;
  color: #888;
}

.variant-rating {
  min-width: 58px;
  font-size: 0.78rem;
  white-space: nowrap;
  color: #6c757d;
}

.variant-badge {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.variant-deal-icon {
  font-size: 0.9rem;
  color: #e65100;
  cursor: default;
}

.variant-actions {
  margin-left: auto;
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}

.variant-buy {
  font-size: 0.82rem;
  padding: 4px 12px;
  white-space: nowrap;
}

.variant-chart,
.variant-flag {
  font-size: 0.8rem;
  padding: 2px 8px;
}

/* ── Masonry layout — each page-batch is an independent column-count container ── */
/* True masonry: shorter cards fill gaps instead of leaving whitespace rows. */
/* Each .groups-page is independent so infinite scroll appends never reflow previous batches. */
.groups-page {
  column-count: 1;
  column-gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .groups-page { column-count: 2; }
}

@media (min-width: 1200px) {
  .groups-page { column-count: 3; }
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1rem;
}

/* ── Cards ── */
.card {
  border-color: #dee2e6;
}

.card.border-warning {
  border-color: #ffc107 !important;
}

.card.border-warning .card-body {
  border-left: 3px solid #ffc107;
}

/* ── Prevent image overflow ── */
.min-width-0 {
  min-width: 0;
}

/* ── Flag modal ── */
#flagModal .modal-header {
  background-color: #f8f9ff;
  border-bottom-color: #c8d9f5;
}

/* ── Mobile ── */
@media (max-width: 576px) {
  .variant-thumb,
  .variant-thumb-placeholder { width: 26px; height: 26px; }
  .variant-color { min-width: 80px; }
  .variant-ppkg   { display: none; }
  .variant-rating { display: none; }
  .variant-chart  { display: none; }
  .variant-flag   { display: none; }
}
