/* ============================================================
   HostDeck Store — VPS Product Section
   ============================================================ */

/* ---------- Filter bar ---------- */
.vps-toolbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  margin-bottom: 28px;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 16px; border-radius: var(--radius-pill);
  font-size: 13.5px; font-weight: 600; color: var(--text-2);
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all .18s ease;
}
.chip:hover { color: var(--text); border-color: var(--border-2); }
.chip.active {
  background: var(--grad-brand); color: #06202a; border-color: transparent;
  box-shadow: 0 4px 14px var(--glow);
}
.toolbar-right { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0 12px;
  transition: border-color .18s ease, box-shadow .2s ease;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow-soft); }
.search-box svg { width: 17px; height: 17px; color: var(--text-faint); flex-shrink: 0; }
.search-box input {
  background: transparent; border: none; outline: none;
  padding: 11px 0; font-size: 14px; color: var(--text); width: 160px;
}
.search-box input::placeholder { color: var(--text-faint); }
.select-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 34px 11px 14px;
  font-size: 14px; color: var(--text); font-weight: 500;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b98a9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  cursor: pointer;
}
.select-box:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow-soft); }

/* ---------- Result meta ---------- */
.result-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.result-count { font-size: 14px; color: var(--text-muted); }
.result-count b { color: var(--text); font-weight: 700; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.active-filters .af {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: var(--radius-pill);
  background: var(--glow-soft); border: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-2);
}
.active-filters .af button { color: var(--text-faint); display: inline-flex; }
.active-filters .af button:hover { color: var(--text); }

/* ---------- Product grid ---------- */
.vps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.vps-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  transition: transform .22s ease, border-color .22s ease, box-shadow .25s ease, background-color .22s ease;
}
.vps-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-2);
  box-shadow: var(--shadow), 0 0 34px var(--glow-soft);
  background: var(--bg-card-hover);
}
.vps-card.featured {
  border-color: var(--border-2);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--bg-card)) 0%, var(--bg-card) 60%);
}
.vps-card.featured::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  padding: 1px; background: var(--grad-brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none; opacity: .8;
}
.vps-tag {
  position: absolute; top: 16px; right: 16px;
  font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--glow-soft); border: 1px solid var(--border); color: var(--accent);
}
.vps-tag.popular { background: var(--grad-cta); color: var(--cta-text); border-color: transparent; }
.vps-card-head { margin-bottom: 16px; }
.vps-card-head h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.vps-card-head .vps-cat { font-size: 12.5px; color: var(--text-faint); font-weight: 600; letter-spacing: .3px; }
.vps-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.55; margin-bottom: 18px; min-height: 42px; }

/* resource list */
.vps-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-bottom: 18px; }
.spec { display: flex; align-items: center; gap: 9px; }
.spec svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.spec .spec-val { font-size: 13.5px; font-weight: 600; color: var(--text); }
.spec .spec-lbl { font-size: 11.5px; color: var(--text-faint); }

/* price */
.vps-price { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 16px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.vps-price .now { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); line-height: 1; }
.vps-price .now .cur { font-size: 18px; vertical-align: top; margin-right: 1px; color: var(--text-2); }
.vps-price .was { font-size: 14px; color: var(--text-faint); text-decoration: line-through; }
.vps-price .per { font-size: 13px; color: var(--text-faint); margin-left: auto; align-self: flex-end; }
.vps-card-actions { display: flex; flex-direction: column; gap: 9px; margin-top: auto; }
.vps-card-actions .btn { width: 100%; }

/* empty state */
.vps-empty {
  grid-column: 1 / -1; text-align: center; padding: 60px 20px;
  background: var(--bg-card); border: 1px dashed var(--border-2); border-radius: var(--radius);
}
.vps-empty svg { width: 48px; height: 48px; color: var(--text-faint); margin: 0 auto 16px; }
.vps-empty h4 { font-size: 18px; margin-bottom: 8px; }
.vps-empty p { color: var(--text-muted); font-size: 14px; margin-bottom: 18px; }

@media (max-width: 1200px) { .vps-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .vps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .vps-grid { grid-template-columns: 1fr; }
  .toolbar-right { margin-left: 0; width: 100%; }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }
}

/* ---------- Comparison table ---------- */
.compare-wrap {
  overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); -webkit-overflow-scrolling: touch;
}
.compare-table { width: 100%; border-collapse: collapse; min-width: 820px; }
.compare-table th, .compare-table td {
  padding: 15px 18px; text-align: left; font-size: 14px;
  border-bottom: 1px solid var(--border-soft); white-space: nowrap;
}
.compare-table thead th {
  position: sticky; top: 0; background: var(--bg-elev);
  font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--text-muted); z-index: 2;
}
.compare-table tbody tr { transition: background-color .15s ease; }
.compare-table tbody tr:hover { background: var(--glow-soft); }
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table .plan-name { font-weight: 700; color: var(--text); }
.compare-table .plan-name small { display: block; font-weight: 500; font-size: 12px; color: var(--text-faint); }
.compare-table .price-cell { font-weight: 800; color: var(--text); }
.compare-table .price-cell small { display: block; font-weight: 500; font-size: 12px; color: var(--text-faint); text-decoration: line-through; }
.compare-table .res-cell { font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.compare-table .row-featured { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.compare-table .row-featured .plan-name { color: var(--accent); }
.compare-table .btn { padding: 8px 14px; font-size: 13px; }
.compare-scroll-hint { display: none; font-size: 12.5px; color: var(--text-faint); margin-top: 10px; text-align: center; }
@media (max-width: 820px) { .compare-scroll-hint { display: block; } }
