/**
 * PragCore App Store — Visual & Component Styles
 * Follows PragCore design tokens (--void, --surface, --cyan, --magenta, --lime, --font-display, --ease-out)
 */

/* Header alignment */
.store-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(3, 3, 6, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--chrome-hairline);
}

/* Page Container */
.store-main {
  min-height: calc(100vh - var(--header-h));
  padding-bottom: 5rem;
}

.store-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero Section / Spotlight */
.store-hero {
  padding: 2.5rem 0 1.5rem;
}

.store-hero__header {
  margin-bottom: 2rem;
}

.store-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 232, 216, 0.08);
  border: 1px solid rgba(0, 232, 216, 0.25);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 0.85rem;
}

.store-hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse-dot 2s infinite var(--ease-out);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.store-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-display);
  margin: 0 0 0.75rem 0;
  background: linear-gradient(135deg, #ffffff 30%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.store-subtitle {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 680px;
  margin: 0;
  line-height: 1.5;
}

/* Spotlight Carousel / Hero Grid */
.store-spotlight {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.store-spotlight__card {
  position: relative;
  border-radius: 20px;
  padding: 1.75rem;
  background: rgba(18, 18, 30, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 240px;
  transition: transform 0.25s var(--ease-out), border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.store-spotlight__card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 232, 216, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 24px rgba(0, 232, 216, 0.15);
}

.store-spotlight__bg {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.3s ease;
}

.store-spotlight__card:hover .store-spotlight__bg {
  opacity: 0.25;
}

.store-spotlight__top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.store-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.store-spotlight__info {
  flex: 1;
  min-width: 0;
}

.store-spotlight__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cyan);
  margin-bottom: 0.35rem;
}

.store-spotlight__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.35rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-spotlight__tagline {
  font-size: 0.9375rem;
  color: rgba(232, 228, 244, 0.8);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-spotlight__bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.store-platform-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.store-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(230, 226, 244, 0.85);
  white-space: nowrap;
}

.store-pill--live {
  background: rgba(196, 251, 79, 0.12);
  border-color: rgba(196, 251, 79, 0.3);
  color: var(--lime);
}

.store-pill--ai {
  background: rgba(255, 45, 139, 0.12);
  border-color: rgba(255, 45, 139, 0.3);
  color: var(--magenta);
}

/* Action Buttons */
.store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  border: none;
  white-space: nowrap;
}

.store-btn--primary {
  background: #ffffff;
  color: #030306;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

.store-btn--primary:hover {
  background: #f0f0f8;
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.35);
  color: #000;
}

.store-btn--cyan {
  background: var(--cyan);
  color: #030306;
  box-shadow: 0 4px 14px rgba(0, 232, 216, 0.3);
}

.store-btn--cyan:hover {
  background: #26f0e2;
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0, 232, 216, 0.45);
  color: #000;
}

.store-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
}

.store-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

/* Store Navigation Controls & Filter Toolbar */
.store-toolbar {
  position: sticky;
  top: 4.25rem;
  z-index: 90;
  padding: 1.25rem 0;
  background: rgba(3, 3, 6, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 2rem;
}

.store-toolbar__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .store-toolbar__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.store-search {
  position: relative;
  flex: 1;
  max-width: 420px;
}

.store-search__input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: inherit;
  font-size: 0.9375rem;
  outline: none;
  transition: all 0.2s ease;
}

.store-search__input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 232, 216, 0.2);
}

.store-search__icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
  font-size: 0.9rem;
}

/* Category Filter Tabs */
.store-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.store-tabs::-webkit-scrollbar {
  display: none;
}

.store-tab {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(230, 226, 244, 0.75);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.store-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.store-tab.is-active {
  background: #ffffff;
  border-color: #ffffff;
  color: #030306;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
}

/* App Grid Section */
.store-section {
  margin-bottom: 3.5rem;
}

.store-section__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-display);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.store-section__count {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--cyan);
  background: rgba(0, 232, 216, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 232, 216, 0.2);
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* Standard Product Card */
.app-card {
  position: relative;
  background: rgba(14, 14, 24, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s var(--ease-out), border-color 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(0, 232, 216, 0.08);
}

.app-card__header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.app-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.app-card__meta {
  flex: 1;
  min-width: 0;
}

.app-card__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.25rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-card__category {
  font-size: 0.8125rem;
  color: rgba(218, 214, 236, 0.65);
  margin-bottom: 0.25rem;
}

.app-card__desc {
  font-size: 0.875rem;
  color: rgba(220, 216, 236, 0.82);
  line-height: 1.4;
  margin: 0 0 1.25rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Detail Modal Sheet */
.store-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(3, 3, 6, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.store-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.store-modal__dialog {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background: #0d0d16;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7), 0 0 32px rgba(0, 232, 216, 0.15);
  position: relative;
  transform: scale(0.94);
  transition: transform 0.25s var(--ease-out);
}

.store-modal.is-open .store-modal__dialog {
  transform: scale(1);
}

.store-modal__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.store-modal__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.store-modal__head {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.store-modal__icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.store-modal__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.35rem 0;
}

.store-modal__tagline {
  font-size: 1rem;
  color: var(--cyan);
  margin: 0;
}

.store-modal__body {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.store-modal__section-title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  margin: 1.5rem 0 0.75rem 0;
}

.store-modal__links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.store-modal__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: background 0.2s ease;
}

.store-modal__link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 232, 216, 0.3);
}

/* Empty State */
.store-empty {
  text-align: center;
  padding: 4rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 20px;
}

.store-empty__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.store-empty__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff;
  margin: 0 0 0.5rem 0;
}

.store-empty__desc {
  color: var(--muted);
  font-size: 0.9375rem;
  margin: 0 0 1.5rem 0;
}
