/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--accent);
  color: var(--accent-on);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--accent-on);
}

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.btn--ghost:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn--sm {
  padding: 7px 14px;
  font-size: 13px;
}

.btn--lg {
  padding: 14px 24px;
  font-size: 15px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.btn-icon:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
}

.badge--featured {
  background: var(--accent-subtle);
  color: var(--accent);
}

.badge--free {
  background: rgba(255, 255, 255, 0.06);
  color: var(--success);
}

.badge--new {
  background: rgba(255, 255, 255, 0.1);
  color: var(--info);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.tab {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
}

.tab:hover { color: var(--text-primary); }

.tab.is-active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

/* Category pills */
.pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.pills::-webkit-scrollbar { display: none; }

.pill {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

.pill:hover,
.pill.is-active {
  color: var(--text-primary);
  background: var(--bg-elevated);
  border-color: var(--border-default);
}

.pill.is-active {
  background: var(--accent-subtle);
  border-color: var(--border-strong);
  color: var(--accent);
}

/* Product card */
.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-elevated);
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-card__media img {
  transform: scale(1.03);
}

.product-card__media .badge {
  position: absolute;
  top: 10px;
  left: 10px;
}

.product-card__body {
  padding: 14px 16px 16px;
}

.product-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: capitalize;
  flex-wrap: wrap;
}

.product-card__format {
  text-transform: lowercase;
  color: var(--text-muted);
}

.format-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.product-card__title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
  transition: color var(--transition);
}

.product-card:hover .product-card__title { color: var(--accent); }

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price {
  font-size: 15px;
  font-weight: 600;
}

.price--free { color: var(--success); }

/* Format icons row */
.format-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.format-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  min-width: 100px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.format-item:hover {
  border-color: var(--border-default);
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.format-item__icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* Pricing cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

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

.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  position: relative;
}

.pricing-card--featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-subtle) 0%, var(--bg-surface) 40%);
}

.pricing-card__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.pricing-card__price {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.pricing-card__price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
}

.pricing-card__desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.pricing-card__features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.pricing-card__features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.pricing-card__features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

/* Sidebar filter */
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.sidebar__title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.sidebar__group {
  margin-bottom: 24px;
}

.sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.sidebar__link:hover,
.sidebar__link.is-active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.sidebar__count {
  font-size: 12px;
  color: var(--text-muted);
}

/* Select */
.select {
  padding: 8px 32px 8px 12px;
  font-size: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239898a0' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-secondary);
}

/* Skeleton */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
