/* ============================================================
   Unified product catalog, purchase flow & admin tools styling.
   Reused across roblox-eco / website-eco / discord-eco product pages.
   ============================================================ */

.sl-catalog-section { padding: 2rem 1.5rem 5rem; }
.sl-catalog-container { max-width: 1200px; margin: 0 auto; }

.sl-catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.sl-catalog-toolbar-left { display: flex; gap: 0.75rem; flex-wrap: wrap; flex: 1; min-width: 220px; }

.sl-input, .sl-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  font-size: 0.88rem;
}
.sl-input { flex: 1; min-width: 180px; }
.sl-input::placeholder { color: rgba(255, 255, 255, 0.4); }

.sl-btn {
  border: 0;
  cursor: pointer;
  border-radius: 10px;
  padding: 0.65rem 1.1rem;
  font-size: 0.86rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 120ms ease, opacity 120ms ease;
}
.sl-btn:active { transform: scale(0.97); }
.sl-btn-primary { background: linear-gradient(135deg, #fff, #d7d5ff); color: #111; }
.sl-btn-secondary { background: rgba(255, 255, 255, 0.08); color: #fff; border: 1px solid rgba(255, 255, 255, 0.16); }
.sl-btn-danger { background: rgba(255, 70, 70, 0.16); color: #ff8080; border: 1px solid rgba(255, 70, 70, 0.3); }
.sl-btn-block { width: 100%; justify-content: center; }
.sl-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Grid & cards ---- */
.sl-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}

.sl-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 160ms ease, border-color 160ms ease;
}
.sl-card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.25); }

.sl-card-media {
  aspect-ratio: 16/10;
  background: rgba(255, 255, 255, 0.05) center/cover no-repeat;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 0.6rem;
}
.sl-card-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.sl-card-badges { display: flex; gap: 0.4rem; position: relative; z-index: 1; flex-wrap: wrap; }
.sl-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  backdrop-filter: blur(6px);
}
.sl-badge-free { background: rgba(60, 200, 120, 0.85); color: #06210f; }
.sl-badge-discount { background: rgba(255, 90, 90, 0.9); color: #240707; }

.sl-card-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.sl-card-title { font-size: 1rem; font-weight: 700; color: #fff; margin: 0; }
.sl-card-desc {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sl-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 0.5rem; }
.sl-price { display: flex; flex-direction: column; }
.sl-price-final { font-weight: 800; color: #fff; font-size: 1.02rem; }
.sl-price-original { font-size: 0.76rem; color: rgba(255, 255, 255, 0.4); text-decoration: line-through; }
.sl-card-actions { display: flex; gap: 0.4rem; }
.sl-icon-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sl-icon-btn.is-liked { background: rgba(255, 90, 130, 0.22); border-color: rgba(255, 90, 130, 0.5); color: #ff7fa3; }

.sl-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(255, 255, 255, 0.5);
}

.sl-admin-toggle-slot { display: flex; }

/* ---- Modal shell (reused for detail / confirm / admin form) ---- */
.sl-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.72);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.sl-modal-backdrop[hidden] { display: none; }

.sl-modal {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #111219;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 1.5rem;
  color: #fff;
}
.sl-modal-wide { width: min(680px, 100%); }

.sl-modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem; gap: 1rem; }
.sl-modal-head h3 { margin: 0; font-size: 1.15rem; }
.sl-modal-close { border: 0; background: transparent; color: rgba(255, 255, 255, 0.6); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.sl-modal-close:hover { color: #fff; }

.sl-form-group { margin-bottom: 0.9rem; display: flex; flex-direction: column; gap: 0.35rem; }
.sl-form-group label { font-size: 0.78rem; color: rgba(255, 255, 255, 0.6); text-transform: uppercase; letter-spacing: 0.03em; }
.sl-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.sl-textarea { flex: none; min-height: 90px; resize: vertical; }
.sl-hint { font-size: 0.74rem; color: rgba(255, 255, 255, 0.4); }
.sl-checkbox-row { display: flex; align-items: center; gap: 0.5rem; flex-direction: row; }
.sl-checkbox-row label { text-transform: none; font-size: 0.86rem; color: #fff; }

.sl-error-text { color: #ff8080; font-size: 0.82rem; min-height: 1.1em; }

/* ---- Purchase confirmation steps ---- */
.sl-confirm-steps { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1rem; }
.sl-confirm-item { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 0.9rem; }
.sl-confirm-item p { margin: 0 0 0.4rem; font-size: 0.9rem; color: rgba(255, 255, 255, 0.8); }
.sl-turnstile-box { min-height: 65px; display: flex; align-items: center; }

/* ---- Image dropzone (admin add/edit product) ---- */
.sl-dropzone {
  border: 1.5px dashed rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 1.6rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.55);
  transition: border-color 120ms ease, background 120ms ease;
}
.sl-dropzone:hover,
.sl-dropzone:focus-visible { border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.03); outline: none; }
.sl-dropzone.is-dragover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }
.sl-dropzone i { width: 26px; height: 26px; color: rgba(255, 255, 255, 0.4); }
.sl-dropzone span { font-size: 0.86rem; }
.sl-dropzone .sl-hint { font-size: 0.72rem; }

.sl-image-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}
.sl-image-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.sl-image-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sl-image-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Link/Upload tabs for product file field ---- */
.sl-file-mode-tabs { display: flex; gap: 0.4rem; margin-bottom: 0.5rem; }
.sl-file-mode-tab {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
  cursor: pointer;
}
.sl-file-mode-tab.active { background: #fff; color: #111; border-color: #fff; font-weight: 600; }

/* ---- Admin gear button on product cards ---- */
.sl-icon-btn.sl-admin-edit { background: rgba(255, 255, 255, 0.1); }

/* ---- Admin product list inside manage modal ---- */
.sl-admin-list { display: flex; flex-direction: column; gap: 0.6rem; max-height: 260px; overflow-y: auto; margin-bottom: 1rem; }
.sl-admin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  font-size: 0.85rem;
}
.sl-admin-list-item span { color: rgba(255, 255, 255, 0.7); }
.sl-admin-list-actions { display: flex; gap: 0.4rem; }

@media (max-width: 560px) {
  .sl-form-row { grid-template-columns: 1fr; }
}