:root {
  --bg-main: #090a0f;
  --bg-card: #131620;
  --bg-card-hover: #191d2a;
  --bg-input: #10121a;
  --border-card: rgba(255, 255, 255, 0.08);
  --border-focus: #f59e0b;
  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.25);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --emerald: #10b981;
  --cyan: #38bdf8;
  --radius: 12px;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

.catalog-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* Header & Hero */
.catalog-hero {
  text-align: center;
  margin-bottom: 32px;
  padding: 30px 16px 10px;
}

.catalog-hero .gold-kicker {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: inline-block;
}

.catalog-hero h1 {
  font-size: 2.3rem;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
  color: #fff;
}

.catalog-hero h1 span {
  color: var(--gold);
}

.catalog-hero p {
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
  font-size: 15px;
}

/* Search Bar */
.catalog-search-wrap {
  margin: 0 auto 36px;
  max-width: 820px;
}

.catalog-search-form {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.catalog-search-form:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.catalog-search-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 16px 20px;
  font-size: 16px;
  color: #fff;
  outline: none;
}

.catalog-search-input::placeholder {
  color: var(--text-dim);
}

.catalog-search-btn {
  background: var(--gold);
  color: #000;
  border: none;
  padding: 0 28px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.2s;
}

.catalog-search-btn:hover {
  background: #fbbf24;
}

/* Breadcrumbs */
.catalog-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.catalog-crumbs a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.15s;
}

.catalog-crumbs a:hover {
  color: #fff;
  text-decoration: underline;
}

.catalog-crumbs .sep {
  color: var(--text-dim);
}

.catalog-crumbs .current {
  color: var(--gold);
  font-weight: 600;
}

/* Brands Grid */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 16px;
}

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

.brand-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.brand-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.4), 0 0 20px rgba(245,158,11,0.1);
}

.brand-logo-box {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #191c28;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-fallback-icon {
  font-size: 20px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.5px;
}

.brand-info {
  flex: 1;
  min-width: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.brand-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-new {
  background: var(--emerald);
  color: #052e16;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.brand-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Subfolders Grid */
.folder-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 32px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.folder-section-title span {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dim);
}

.folder-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.folder-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.folder-icon {
  font-size: 24px;
}

.folder-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

/* Files List */
.files-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: all 0.2s;
}

.file-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(245, 158, 11, 0.3);
}

@media (max-width: 768px) {
  .file-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .file-actions {
    width: 100%;
    margin-top: 10px;
  }
  .download-btn {
    width: 100%;
    justify-content: center;
  }
}

.file-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.file-icon-badge {
  background: #1f2433;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  flex-shrink: 0;
}

.file-details {
  flex: 1;
  min-width: 0;
}

.file-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  word-break: break-word;
}

.file-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.file-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.download-btn {
  background: var(--gold);
  color: #050505;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px var(--gold-glow);
  transition: all 0.2s;
  white-space: nowrap;
}

.download-btn:hover {
  background: #fbbf24;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  margin-top: 20px;
}

.empty-state h3 {
  color: #fff;
  margin-top: 10px;
}

.empty-state p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* User & Wallet Header Strip */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.user-nav-strip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wallet-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.wallet-amount {
  color: var(--gold);
}

.wallet-add-btn {
  background: var(--gold);
  color: #000;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  line-height: 1;
  transition: transform 0.15s;
}

.wallet-add-btn:hover {
  transform: scale(1.15);
  background: #fbbf24;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1c202d;
  border: 1px solid var(--border-card);
  padding: 4px 10px 4px 6px;
  border-radius: 20px;
  font-size: 13px;
}

.user-avatar-initial {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  color: #000;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-name {
  color: #fff;
  font-weight: 600;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-logout-btn {
  color: var(--text-dim);
  font-size: 11px;
  text-decoration: none;
  margin-left: 4px;
}

.user-logout-btn:hover {
  color: #fca5a5;
}

.auth-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}

.auth-btn.login {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-btn.login:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.auth-btn.register {
  background: var(--gold);
  color: #000;
}

.auth-btn.register:hover {
  background: #fbbf24;
}

