/* Shop All — digital resources catalog */

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

body.shopAll .shop-all-main {
  position: relative;
  z-index: 1;
  padding: 0 24px 96px;
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.shop-hero {
  display: block;
  padding: 56px 0 40px;
  text-align: center;
  grid-template-columns: none;
  max-width: none;
  margin: 0;
}

.shop-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

/* Pill badge */
.shop-eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(124, 89, 255, 0.1);
  border: 1px solid rgba(124, 89, 255, 0.28);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(167, 139, 250, 0.9);
  margin: 0 0 20px;
}

.shop-eyebrow-pill svg {
  color: #a78bfa;
  flex-shrink: 0;
}

body.shopAll .shop-all-title {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin: 0 0 14px;
  letter-spacing: -0.03em;
  text-align: center;
  width: 100%;
}

.shop-all-subtitle {
  font-size: 0.97rem;
  color: rgba(255, 255, 255, 0.48);
  margin: 0;
  max-width: 480px;
  line-height: 1.65;
  text-align: center;
  width: 100%;
}

/* ── Hero stats bar ─────────────────────────────────────────────────────────── */
.shop-hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 28px;
  padding: 16px 32px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.shs-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.shs-stat strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.shs-stat span {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.38);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.shs-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}



/* ── Controls bar ───────────────────────────────────────────────────────────── */
.shop-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  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 18px;
  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);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  white-space: nowrap;
  font-family: inherit;
}

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

.category-tab.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);
}

.category-tab.spc-tab--free.active {
  color: #c4b5fd;
  background: rgba(97, 71, 189, 0.12);
  border-color: rgba(167, 139, 250, 0.4);
}

.category-tab.spc-tab--premium.active {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.35);
}

.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.4);
  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;
  transition: border-color 0.18s;
}

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

/* ── Category filter row ────────────────────────────────────────────────────── */
.shop-cat-row {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: 24px;
  padding-bottom: 2px;
  /* fade edges to hint scroll */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

.shop-cat-row::-webkit-scrollbar { display: none; }

.shop-cat-tabs {
  display: flex;
  gap: 7px;
  padding: 0 20px;
  flex-wrap: nowrap;
  width: max-content;
}

.sct-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.79rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  font-family: inherit;
}

.sct-btn:hover {
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.sct-btn.active {
  color: #c4b5fd;
  background: rgba(124, 89, 255, 0.14);
  border-color: rgba(124, 89, 255, 0.42);
}

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

body.shopAll #shop-visible-count {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

/* ── Product grid ───────────────────────────────────────────────────────────── */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  transition: opacity 0.18s ease;
}

.shop-grid.is-loading {
  opacity: 0.3;
  pointer-events: none;
}

/* Stagger fade-in for AJAX-injected cards */
@keyframes spcCardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.shop-grid .spc { animation: spcCardIn 0.28s ease both; }
.shop-grid .spc:nth-child(2)   { animation-delay: 0.04s; }
.shop-grid .spc:nth-child(3)   { animation-delay: 0.08s; }
.shop-grid .spc:nth-child(4)   { animation-delay: 0.12s; }
.shop-grid .spc:nth-child(5)   { animation-delay: 0.06s; }
.shop-grid .spc:nth-child(6)   { animation-delay: 0.10s; }
.shop-grid .spc:nth-child(7)   { animation-delay: 0.14s; }
.shop-grid .spc:nth-child(8)   { animation-delay: 0.08s; }
.shop-grid .spc:nth-child(n+9) { animation-delay: 0.12s; }

/* ── SPC card ───────────────────────────────────────────────────────────────── */
.spc {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(13, 10, 28, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
  position: relative;
}

/* Cards are clickable — open quick view */
.spc { cursor: pointer; }

/* Wishlist and hover panel layering */
.spc-wish        { z-index: 5; }
.spc-hover       { z-index: 4; }
.spc-badges-left { z-index: 4; }

.spc:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 89, 255, 0.38);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(124, 89, 255, 0.14),
    0 0 40px rgba(124, 89, 255, 0.06);
}

/* Discount badge */
.spc-discount {
  font-size: 0.68rem;
  font-weight: 700;
  color: #c4b5fd;
  background: rgba(97, 71, 189, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 5px;
  padding: 1px 5px;
  margin-left: 2px;
}

/* ── Media area ─────────────────────────────────────────────────────────────── */
.spc-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0d0b1e 0%, #12102a 100%);
  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.05) 50%,
    rgba(255,255,255,0.00) 100%
  );
  background-size: 200% 100%;
  animation: spcImgShimmer 1.6s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}
.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.38s ease, opacity 0.3s ease;
  display: block;
  opacity: 0;
}
.spc-media img.is-loaded { opacity: 1; }

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

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

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

.spc-hover span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(124, 89, 255, 0.88);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(124, 89, 255, 0.4);
}

/* ── Badges (left column on image) ──────────────────────────────────────────── */
.spc-badges-left {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
}

.spc-badge {
  display: inline-block;
  font-family: inherit;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 9px;
}

.spc-badge--featured {
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 89, 255, 0.92), rgba(155, 125, 255, 0.92));
  box-shadow: 0 2px 12px rgba(124, 89, 255, 0.35);
}

.spc-badge--free {
  color: #c4b5fd;
  background: rgba(97, 71, 189, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.45);
}

/* ── Wishlist button ─────────────────────────────────────────────────────────── */
.spc-wish {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.18s, color 0.18s, border-color 0.18s;
}

.spc:hover .spc-wish {
  opacity: 1;
  transform: scale(1);
}

.spc-wish:hover {
  background: rgba(239, 68, 68, 0.8);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fff;
  transform: scale(1.12) !important;
}

.spc-wish.is-wishlisted {
  opacity: 1;
  background: rgba(239, 68, 68, 0.8);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fff;
  transform: scale(1);
}

.spc-wish.is-wishlisted svg { fill: currentColor; }

/* ── Card info ──────────────────────────────────────────────────────────────── */
.spc-info {
  padding: 14px 15px 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  cursor: pointer;
  min-height: 0;
}

/* Top row: category label + format chip */
.spc-info-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.spc-cat {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(167, 139, 250, 0.8);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Format chip (Figma / PDF / etc.) — UI8 style */
.spc-fmt-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(96, 165, 250, 0.1);
  color: rgba(147, 197, 253, 0.8);
  border: 1px solid rgba(96, 165, 250, 0.2);
}

.spc-name-link {
  text-decoration: none;
  display: block;
}
.spc-name-link:hover .spc-name { color: #a78bfa; }
.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;
  transition: color .15s;
}

/* ── Star rating row ─────────────────────────────────────────────────────────── */
.spc-meta-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.spc-stars {
  display: flex;
  align-items: center;
  gap: 1px;
}

.spc-star {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.14);
  line-height: 1;
}

.spc-star.is-full { color: #f59e0b; }

.spc-star.is-half {
  background: linear-gradient(90deg, #f59e0b 55%, rgba(255,255,255,0.14) 55%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.spc-rating-num {
  font-size: 0.67rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  margin-left: 3px;
}

.spc-meta-sep { color: rgba(255, 255, 255, 0.18); font-size: 0.7rem; }

.spc-sales {
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.3);
}

/* ── Card footer: price + CTA (UI8 style) ───────────────────────────────────── */
.spc-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.spc-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-shrink: 0;
}

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

.spc-price.is-free {
  color: #c4b5fd;
  font-size: 0.92rem;
  font-weight: 700;
}

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

/* Card CTA — compact override for the card footer */
.spc-card-footer .uxp-card-btn {
  font-size: 0.73rem;
  min-height: 28px;
  padding: 4px 12px;
  cursor: pointer;
}

/* ── Empty state ────────────────────────────────────────────────────────────── */
.shop-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 80px 24px;
  color: rgba(255, 255, 255, 0.35);
  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: 52px;
}

.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.55);
  font-size: 0.82rem;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  padding: 0 10px;
}

.page-btn svg { width: 16px; height: 16px; }

.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.25;
  pointer-events: none;
}

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

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

@media (max-width: 860px) {
  .shop-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .shop-hero {
    padding: 40px 0 24px;
  }

  .shop-hero-stats {
    gap: 20px;
    padding: 14px 24px;
  }
}

@media (max-width: 560px) {
  .shc-btn {
    padding: 11px 20px;
    font-size: 0.85rem;
  }

  .shop-hero-stats {
    gap: 16px;
    padding: 12px 20px;
  }

  .shs-stat strong { font-size: 0.95rem; }
}

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

  body.shopAll .shop-all-title {
    font-size: 1.75rem;
    letter-spacing: -0.02em;
  }

  .shop-all-subtitle {
    font-size: 0.9rem;
  }

  .shop-subtitle-br { display: none; }
}
