/* Shop All — digital resources catalog */

/* ── Page ambient glow ─────────────────────────────────────────────────────── */
body.shopAll .main::before {
  content: '';
  position: fixed;
  top: -12%;
  left: 50%;
  transform: translateX(-50%);
  width: 920px;
  height: 620px;
  background: radial-gradient(ellipse at 50% 0%, rgba(109, 61, 255, 0.11) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

body.shopAll .shop-all-main {
  position: relative;
  z-index: 1;
  padding-bottom: 80px;
}

/* ── Hero header ────────────────────────────────────────────────────────────── */
body.shopAll .shop-all-header {
  text-align: center;
  padding: 56px 0 32px;
}

body.shopAll .shop-all-title span {
  background: linear-gradient(130deg, #a78bfa 0%, #c4b5fd 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.shopAll .shop-all-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

body.shopAll .shop-all-breadcrumb a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
}

body.shopAll .shop-all-breadcrumb a:hover { color: #fff; }

/* ── Controls bar ───────────────────────────────────────────────────────────── */
.shop-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.category-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.category-tab {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  white-space: nowrap;
}

.category-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.15);
}

.category-tab.active,
.category-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 89, 255, 0.7), rgba(100, 72, 220, 0.7));
  border-color: rgba(124, 89, 255, 0.5);
}

/* separator between nav tabs and filter pills */
.cat-tabs-sep {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 4px;
  flex-shrink: 0;
}

/* Filter pill buttons */
.spc-filter-pill {
  font-family: inherit;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sort-control label {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

.sort-control select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

.sort-control select:focus {
  border-color: rgba(124, 89, 255, 0.5);
}

/* ── Results meta ───────────────────────────────────────────────────────────── */
body.shopAll .shop-results-meta {
  margin-bottom: 20px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
}

body.shopAll .shop-results-meta strong {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

/* ── Product grid ───────────────────────────────────────────────────────────── */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

/* ── SPC card ───────────────────────────────────────────────────────────────── */
.spc {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(14, 11, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  cursor: pointer;
}

.spc:hover {
  transform: translateY(-5px);
  border-color: rgba(124, 89, 255, 0.32);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(124, 89, 255, 0.12);
}

/* ── Media area ─────────────────────────────────────────────────────────────── */
.spc-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0d0b1e 0%, #12102a 100%);
  text-decoration: none;
  flex-shrink: 0;
}

/* Shimmer skeleton while image loads */
.spc-media::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.00) 0%,
    rgba(255,255,255,0.06) 50%,
    rgba(255,255,255,0.00) 100%
  );
  background-size: 200% 100%;
  animation: spcImgShimmer 1.5s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
}
.spc-media.img-ready::before { display: none; }

@keyframes spcImgShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.spc-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.3s ease;
  display: block;
  opacity: 0;
}
.spc-media img.is-loaded { opacity: 1; }

.spc:hover .spc-media img {
  transform: scale(1.04);
}

/* Hover overlay — Quick View */
.spc-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 8, 24, 0.58);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.spc:hover .spc-hover {
  opacity: 1;
}

.spc-hover span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 999px;
  background: rgba(124, 89, 255, 0.82);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Badges */
.spc-badge {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  font-family: Inter, sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 999px;
}

.spc-badge--featured {
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 89, 255, 0.9), rgba(155, 125, 255, 0.9));
  box-shadow: 0 0 12px rgba(124, 89, 255, 0.3);
}

.spc-badge--free {
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.4);
}

/* Format label */
.spc-fmt {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

/* ── Card info ──────────────────────────────────────────────────────────────── */
.spc-info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.spc-cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(167, 139, 250, 0.8);
  margin: 0;
}

.spc-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spc-price-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 6px;
}

.spc-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.spc-price-old {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.38);
  text-decoration: line-through;
}

/* ── Empty state ────────────────────────────────────────────────────────────── */
.shop-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 72px 24px;
  color: rgba(255, 255, 255, 0.38);
  text-align: center;
}

.shop-empty-state p {
  font-size: 1rem;
  margin: 0;
}

/* ── Pagination ─────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
}

.page-btn,
.page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  padding: 0 10px;
}

.page-btn:hover:not(.disabled),
.page-num:hover {
  background: rgba(124, 89, 255, 0.18);
  border-color: rgba(124, 89, 255, 0.4);
  color: #fff;
}

.page-num.active {
  background: linear-gradient(135deg, rgba(124, 89, 255, 0.75), rgba(100, 72, 220, 0.75));
  border-color: rgba(124, 89, 255, 0.6);
  color: #fff;
  font-weight: 600;
}

.page-btn.disabled {
  opacity: 0.28;
  pointer-events: none;
}

.page-ellipsis {
  color: rgba(255, 255, 255, 0.3);
  padding: 0 4px;
  font-size: 0.85rem;
}

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

@media (max-width: 860px) {
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-controls {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  body.shopAll .shop-all-header {
    padding: 36px 0 24px;
  }
}
