/* ==========================================================================
   MAKERSTUDIO3D.COM — 3D MODEL MARKETPLACE & COMMUNITY PLATFORM STYLESHEET
   Aesthetics: MakerWorld & Thingiverse Inspired Layout, Glassmorphism, Theme-Aware
   ========================================================================== */

/* Main Marketplace Layout Shell */
.marketplace-layout {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
  position: relative;
  background: var(--bg-primary);
}

/* ==========================================================================
   1. COLLAPSIBLE LEFT SIDEBAR
   ========================================================================== */
.marketplace-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  border-inline-end: 1px solid var(--border-subtle);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  transition: width var(--transition-normal), transform var(--transition-normal);
  z-index: 90;
}

.marketplace-sidebar.collapsed {
  width: 72px;
}

.marketplace-sidebar::-webkit-scrollbar {
  width: 4px;
}

.marketplace-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: var(--radius-full);
}

.sidebar-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.5rem;
}

.sidebar-collapse-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sidebar-collapse-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-glow);
}

.sidebar-section {
  padding: 0.75rem 0.75rem;
}

.sidebar-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem 0.25rem;
}

.marketplace-sidebar.collapsed .sidebar-section-title {
  display: none;
}

.sidebar-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  position: relative;
}

.sidebar-nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.sidebar-nav-item.active {
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  border-color: rgba(2, 132, 199, 0.25);
}

[data-theme="dark"] .sidebar-nav-item.active {
  border-color: rgba(0, 240, 255, 0.3);
}

[data-theme="extravagant"] .sidebar-nav-item.active {
  background: rgba(251, 191, 36, 0.15);
  color: #ffd700;
  border-color: rgba(251, 191, 36, 0.4);
}

.sidebar-nav-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.sidebar-nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.marketplace-sidebar.collapsed .sidebar-nav-label {
  display: none;
}

.sidebar-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  background: var(--accent-rose);
  color: #fff;
  font-weight: 700;
}

.marketplace-sidebar.collapsed .sidebar-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 2px 5px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.marketplace-sidebar.collapsed .sidebar-footer {
  display: none;
}

.sidebar-footer a {
  color: var(--text-muted);
  text-decoration: none;
  margin-inline-end: 0.5rem;
}

.sidebar-footer a:hover {
  color: var(--accent-cyan);
}

/* ==========================================================================
   2. MAIN CONTENT AREA & TOP ACTION BAR
   ========================================================================== */
.marketplace-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.marketplace-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.85rem 2rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: var(--nav-height);
  z-index: 80;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.search-input-wrapper {
  flex: 1;
  max-width: 600px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon-inside {
  position: absolute;
  inset-inline-start: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-field {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.65rem 2.8rem;
  color: var(--text-primary);
  font-size: 0.92rem;
  outline: none;
  transition: all var(--transition-fast);
}

.search-input-field:focus {
  border-color: var(--border-focus);
  background: var(--bg-input);
  box-shadow: 0 0 14px var(--accent-cyan-dim);
}

.search-clear-btn {
  position: absolute;
  inset-inline-end: 0.85rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  padding: 0.25rem;
  font-size: 0.9rem;
}

.search-clear-btn.visible {
  display: block;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Upload Action Button */
.btn-upload-model {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
}

.btn-upload-model:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

/* Currency & Notification Buttons */
.icon-action-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.icon-action-btn:hover {
  background: var(--bg-card);
  border-color: var(--border-glow);
  transform: translateY(-1px);
}

.notification-badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--accent-rose);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-rose);
}

/* Currency Dropdown */
.currency-dropdown-wrap {
  position: relative;
}

.currency-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.42rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.currency-btn:hover {
  border-color: var(--border-glow);
  background: var(--bg-card);
}

.currency-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: 140px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.4rem;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: none;
  z-index: 1050;
}

.currency-dropdown.show {
  display: block;
  animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.currency-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.currency-option:hover,
.currency-option.active {
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  font-weight: 700;
}

/* User Quota Reward Pill */
.user-quota-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--accent-amber);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
}

/* ==========================================================================
   3. CATEGORY FILTER CAROUSEL
   ========================================================================== */
.category-carousel-wrap {
  padding: 0.85rem 2rem 0.5rem;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-carousel {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
}

.category-carousel::-webkit-scrollbar {
  display: none;
}

.category-pill {
  white-space: nowrap;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.category-pill:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-glow);
}

.category-pill.active {
  background: var(--text-primary);
  color: var(--text-inverse);
  border-color: var(--text-primary);
  font-weight: 700;
}

[data-theme="light"] .category-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

[data-theme="dark"] .category-pill.active {
  background: #00f0ff;
  color: #030712;
  border-color: #00f0ff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

[data-theme="extravagant"] .category-pill.active {
  background: linear-gradient(135deg, #ffd700, #ff007f);
  color: #090214;
  border-color: #ffd700;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.5);
}

.carousel-arrow-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.carousel-arrow-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-glow);
}

/* Sorting & View Controls Bar */
.marketplace-sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem 0.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.models-count-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.sorting-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sort-select {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

/* ==========================================================================
   4. HERO SHOWCASE CAROUSEL BANNER
   ========================================================================== */
.hero-showcase-container {
  padding: 1rem 2rem 1.5rem;
}

.hero-showcase-slider {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.hero-slide {
  display: none;
  min-height: 240px;
  padding: 2.5rem 3rem;
  position: relative;
  align-items: center;
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  display: flex;
  animation: fadeInDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 10, 18, 0.92) 0%, rgba(7, 10, 18, 0.7) 50%, rgba(7, 10, 18, 0.3) 100%);
  z-index: 1;
}

[data-theme="light"] .hero-slide-overlay {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.4) 100%);
}

[data-theme="extravagant"] .hero-slide-overlay {
  background: linear-gradient(90deg, rgba(9, 2, 20, 0.95) 0%, rgba(20, 4, 38, 0.8) 50%, rgba(35, 8, 62, 0.4) 100%);
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  max-width: 540px;
}

.hero-slide-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  border: 1px solid var(--border-glow);
  margin-bottom: 0.75rem;
}

.hero-slide-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.hero-slide-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.hero-slide-dots {
  position: absolute;
  bottom: 1rem;
  right: 2rem;
  display: flex;
  gap: 0.4rem;
  z-index: 3;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hero-dot.active {
  width: 22px;
  border-radius: var(--radius-full);
  background: var(--accent-cyan);
}

/* ==========================================================================
   5. MAKERWORLD-STYLE 3D MODEL CARDS GRID
   ========================================================================== */
.marketplace-content-wrapper {
  padding: 0 2rem 3rem;
  flex: 1;
}

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

.mw-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
  cursor: pointer;
}

.mw-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-lg), 0 0 20px var(--accent-cyan-dim);
}

.mw-card-thumb-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.mw-card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.mw-card:hover .mw-card-thumb-img {
  transform: scale(1.05);
}

/* Badge Overlays on Card Thumbnail */
.thumb-badge-top-left {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  display: flex;
  gap: 0.35rem;
  z-index: 2;
}

.thumb-tag-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.thumb-tag-badge.badge-ams {
  background: rgba(16, 185, 129, 0.85);
  color: #fff;
  border-color: rgba(16, 185, 129, 0.4);
}

.thumb-tag-badge.badge-cad {
  background: rgba(139, 92, 246, 0.85);
  color: #fff;
  border-color: rgba(139, 92, 246, 0.4);
}

.thumb-like-btn {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 3;
}

.thumb-like-btn:hover,
.thumb-like-btn.liked {
  background: rgba(244, 63, 94, 0.9);
  color: #fff;
  transform: scale(1.1);
  border-color: var(--accent-rose);
}

/* Card Body */
.mw-card-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mw-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mw-card:hover .mw-card-title {
  color: var(--accent-cyan);
}

/* Creator Profile Info Row */
.mw-creator-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.mw-creator-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
}

.mw-creator-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.verified-badge {
  color: var(--accent-cyan);
  font-size: 0.85rem;
}

/* Metrics & Stats Row */
.mw-card-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.mw-metric-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
}

.mw-metric-item svg {
  color: var(--text-muted);
}

.rating-star-icon {
  color: var(--accent-amber);
}

/* ==========================================================================
   6. CONTESTS SECTION (MakerWorld Contests Banner)
   ========================================================================== */
.contests-section {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.contests-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.contests-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.75rem;
}

.contest-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  transition: all var(--transition-normal);
}

.contest-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.contest-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.contest-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   7. STUDIOS & CREATORS DIRECTORY VIEW
   ========================================================================== */
.studios-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.studio-hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

.studio-hub-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.studio-hub-cover {
  height: 90px;
  background: linear-gradient(135deg, var(--accent-cyan-dim), var(--accent-violet-dim));
  position: relative;
}

.studio-hub-avatar-wrap {
  position: absolute;
  bottom: -24px;
  left: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--bg-card);
  overflow: hidden;
  background: var(--bg-tertiary);
}

.studio-hub-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-hub-body {
  padding: 2rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.studio-hub-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.studio-hub-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.studio-hub-bio {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.studio-hub-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.studio-hub-stats b {
  color: var(--text-primary);
}

.btn-follow-studio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.btn-follow-studio:hover,
.btn-follow-studio.following {
  background: var(--accent-cyan);
  color: #030712;
  border-color: var(--accent-cyan);
}

/* ==========================================================================
   8. WATCH HISTORY VIEW
   ========================================================================== */
.history-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.btn-clear-history {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--accent-rose);
  color: var(--accent-rose);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-clear-history:hover {
  background: var(--accent-rose);
  color: #fff;
}

/* ==========================================================================
   9. DEDICATED MODEL DETAILS MODAL / PAGE VIEW
   ========================================================================== */
.model-details-modal-box {
  width: 95%;
  max-width: 1200px;
  height: 90vh;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-slow), opacity var(--transition-slow);
}

.modal-overlay.active .model-details-modal-box {
  transform: translateY(0) scale(1);
}

.details-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.75rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}

.details-modal-header .modal-close-btn {
  position: static;
  flex-shrink: 0;
}

.details-modal-body-split {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  flex: 1;
  overflow: hidden;
}

@media (max-width: 960px) {
  .details-modal-body-split {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

.details-viewer-col {
  background: #03060f;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.details-info-col {
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: var(--bg-secondary);
}

/* Print Technical Specs Table */
.print-specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.print-specs-table tr {
  border-bottom: 1px solid var(--border-subtle);
}

.print-specs-table td {
  padding: 0.6rem 0.5rem;
}

.specs-label {
  color: var(--text-muted);
  font-weight: 600;
  width: 40%;
}

.specs-value {
  color: var(--text-primary);
  font-weight: 700;
  font-family: var(--font-mono);
}

/* Comments Section inside Details */
.comments-thread {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.comment-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
}

.comment-author {
  font-weight: 700;
  color: var(--text-primary);
}

.comment-time {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.comment-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

.comment-input-box {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.comment-input-box input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.85rem;
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
}

/* Creator Upload Modal */
.upload-dropzone {
  border: 2px dashed var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  background: var(--bg-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 1.5rem;
}

.upload-dropzone:hover {
  background: var(--accent-cyan-dim);
  border-color: var(--accent-cyan);
}

/* ==========================================================================
   10. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 900px) {
  .marketplace-sidebar {
    position: fixed;
    top: var(--nav-height);
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow-xl);
    z-index: 1100;
  }

  .marketplace-sidebar.open {
    transform: translateX(0);
  }

  .marketplace-top-bar {
    padding: 0.75rem 1rem;
  }

  .category-carousel-wrap {
    padding: 0.75rem 1rem 0.5rem;
  }

  .marketplace-content-wrapper {
    padding: 0 1rem 2rem;
  }
}
