/* ==================================
   APEX BLACK MARKETPLACE
   Premium commerce styling
   ================================== */

/* Marketplace Hero */
.marketplace-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  padding: 4rem 0;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.marketplace-title {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 1rem;
}

.marketplace-subtitle {
  color: #b8b8b8;
  font-size: 1.125rem;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.quick-categories {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.category-chip {
  padding: 0.625rem 1.25rem;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all 0.2s;
}

.category-chip:hover {
  background: #ff6b35;
  border-color: #ff6b35;
  transform: translateY(-2px);
}

/* Marketplace Sections */
.marketplace-section {
  margin: 4rem 0;
}

.featured-collection {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(181, 55, 255, 0.1) 100%);
  padding: 3rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 107, 53, 0.2);
}

/* Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.category-card {
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: #ff6b35;
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.2);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.category-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.5rem;
}

.category-card p {
  color: #b8b8b8;
  font-size: 0.9375rem;
  margin: 0;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.product-card {
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: #ff6b35;
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.2);
}

.product-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  background: #1a1a1a;
}

.product-content {
  padding: 1.5rem;
}

.product-brand {
  color: #ff6b35;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.product-name {
  font-weight: 700;
  font-size: 1.125rem;
  color: #ffffff;
  margin: 0 0 0.75rem;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #00ff9f;
  margin: 0 0 1rem;
}

.product-actions {
  display: flex;
  gap: 0.75rem;
}

.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.375rem 0.875rem;
  background: #ff6b35;
  color: white;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.product-badge.editors-pick {
  background: #00d4ff;
  color: #0a0a0a;
}

/* Brands Grid */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.brand-card {
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.brand-card:hover {
  transform: translateY(-4px);
  border-color: #ff6b35;
}

.brand-cover {
  width: 100%;
  height: 150px;
  background: linear-gradient(135deg, #ff6b35 0%, #b537ff 100%);
}

.brand-info {
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
}

.brand-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #0a0a0a;
  margin-top: -50px;
  object-fit: cover;
  background: #1a1a1a;
}

.brand-details {
  flex: 1;
}

.brand-name {
  font-weight: 700;
  font-size: 1.25rem;
  color: #ffffff;
  margin: 0 0 0.5rem;
}

.brand-tagline {
  color: #b8b8b8;
  font-size: 0.9375rem;
  margin: 0 0 1rem;
}

.brand-stats {
  display: flex;
  gap: 1.5rem;
  color: #8a8a8a;
  font-size: 0.875rem;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service-card {
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: #00d4ff;
}

.service-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #1a1a1a;
}

.service-content {
  padding: 1.5rem;
}

.service-provider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.provider-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.provider-name {
  font-weight: 600;
  color: #ffffff;
}

.service-name {
  font-weight: 700;
  font-size: 1.125rem;
  color: #ffffff;
  margin: 0 0 0.75rem;
}

.service-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: #00d4ff;
  margin: 0 0 1rem;
}

/* Local Section */
.local-section {
  background: rgba(0, 255, 159, 0.05);
  padding: 3rem;
  border-radius: 16px;
  border: 1px solid rgba(0, 255, 159, 0.2);
}

.local-businesses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

/* Cart Badge */
.icon-btn {
  position: relative;
}

.icon-btn .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ff6b35;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive */
@media (max-width: 1024px) {
  .products-grid,
  .brands-grid,
  .services-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .marketplace-title {
    font-size: 2rem;
  }
  
  .marketplace-subtitle {
    font-size: 1rem;
  }
  
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .products-grid,
  .brands-grid,
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .featured-collection,
  .local-section {
    padding: 2rem 1.5rem;
  }
}

/* Storefront Hero */
.storefront-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  padding: 3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.2;
  background-size: cover;
  background-position: center;
}

.storefront-header {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.store-logo {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  border: 3px solid #0a0a0a;
  background: #1a1a1a;
  flex-shrink: 0;
}

.store-info {
  flex: 1;
}

.store-name {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.5rem;
}

.store-tagline {
  color: #b8b8b8;
  font-size: 1.125rem;
  margin: 0 0 1rem;
}

.store-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.badge {
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-verified {
  background: #00d4ff;
  color: #0a0a0a;
}

.badge-blackowned {
  background: #00ff9f;
  color: #0a0a0a;
}

.badge-local {
  background: #ff6b35;
  color: #ffffff;
}

.store-rating {
  color: #ffd700;
}

.store-actions {
  display: flex;
  gap: 0.75rem;
}

/* Storefront Navigation */
.storefront-nav {
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.storefront-nav .container {
  display: flex;
  gap: 2rem;
}

.nav-tab {
  padding: 1rem 0;
  color: #b8b8b8;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-tab.active,
.nav-tab:hover {
  color: #ffffff;
  border-bottom-color: #ff6b35;
}

/* Listing Detail */
.listing-main {
  padding: 3rem 0;
}

.listing-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.listing-gallery {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.main-image {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a1a;
  margin-bottom: 1rem;
}

.main-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.save-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.save-btn:hover {
  background: #ff6b35;
  border-color: #ff6b35;
}

.thumbnail-gallery {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
}

.thumbnail-gallery img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.thumbnail-gallery img:hover,
.thumbnail-gallery img.active {
  border-color: #ff6b35;
}

.listing-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.listing-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 1rem;
}

.listing-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.seller-link {
  color: #b8b8b8;
}

.seller-link a {
  color: #ff6b35;
  font-weight: 600;
  text-decoration: none;
}

.seller-link a:hover {
  text-decoration: underline;
}

.price-section {
  margin-bottom: 1.5rem;
}

.price {
  font-size: 2rem;
  font-weight: 800;
  color: #00ff9f;
  margin-bottom: 0.5rem;
}

.description {
  color: #b8b8b8;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.variants-section {
  margin-bottom: 2rem;
}

.quantity-section {
  margin-bottom: 2rem;
}

.quantity-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
}

.qty-btn:hover {
  background: #ff6b35;
  border-color: #ff6b35;
}

.quantity-controls input {
  width: 80px;
  height: 40px;
  text-align: center;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
}

.listing-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.listing-details {
  padding: 1.5rem;
  background: #1a1a1a;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.detail-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #b8b8b8;
}

.detail-item:last-child {
  border-bottom: none;
}

.social-actions {
  display: flex;
  gap: 0.75rem;
}

.action-btn {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: #1a1a1a;
  border-color: rgba(255, 255, 255, 0.4);
}

/* Listing Tabs */
.listing-tabs {
  margin: 4rem 0;
}

.tabs-nav {
  display: flex;
  gap: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2rem;
}

.tab-btn {
  padding: 1rem 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #b8b8b8;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active,
.tab-btn:hover {
  color: #ffffff;
  border-bottom-color: #ff6b35;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Category Page */
.category-header {
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  padding: 3rem 0;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 1rem;
}

.category-description {
  color: #b8b8b8;
  font-size: 1.125rem;
  margin: 0 0 1rem;
}

.filters-section {
  padding: 2rem 0;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 90;
}

.filters-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.filters-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

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

.sort-controls label {
  color: #b8b8b8;
  font-weight: 600;
}

.sort-controls select {
  padding: 0.75rem 1rem;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #ffffff;
  font-weight: 600;
}

.category-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

.filters-sidebar {
  position: sticky;
  top: 140px;
  height: fit-content;
}

.filter-group {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-group h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #b8b8b8;
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.checkbox-label input[type="checkbox"],
.checkbox-label input[type="radio"] {
  width: 18px;
  height: 18px;
}

.price-inputs {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.price-inputs input {
  flex: 1;
  padding: 0.75rem;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #ffffff;
}

.filter-group select {
  width: 100%;
  padding: 0.75rem;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #ffffff;
  margin-top: 0.75rem;
}

.filter-actions {
  display: flex;
  gap: 0.75rem;
}

/* Cart */
.cart-main {
  padding: 3rem 0;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 3rem;
  margin-top: 2rem;
}

.cart-items-section {
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
}

.cart-summary {
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
  position: sticky;
  top: 80px;
  height: fit-content;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  color: #b8b8b8;
}

.summary-line.total {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 1rem;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #ffffff;
  margin: 0 0 1rem;
}

.empty-state p {
  color: #b8b8b8;
  margin: 0 0 2rem;
}

/* Orders Page */
.orders-main {
  padding: 3rem 0;
}

.orders-tabs {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Seller Dashboard */
.seller-dashboard {
  padding: 3rem 0;
}

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

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
}

.stat-card h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #b8b8b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 0.75rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: #00ff9f;
  margin: 0;
}

.dashboard-tabs {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breadcrumb a {
  color: #b8b8b8;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #ff6b35;
}

.breadcrumb span {
  color: #8a8a8a;
  margin: 0 0.5rem;
}

/* City Marketplace */
.city-marketplace-hero {
  background: linear-gradient(135deg, #00ff9f 0%, #00d4ff 100%);
  padding: 3rem 0;
  text-align: center;
}

.city-marketplace-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 800;
  color: #0a0a0a;
  margin: 0 0 1rem;
}

.city-marketplace-hero .subtitle {
  color: #1a1a1a;
  font-size: 1.125rem;
  margin: 0 0 2rem;
}

.city-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.city-selector label {
  color: #1a1a1a;
  font-weight: 600;
}

.city-selector select {
  padding: 0.75rem 1.5rem;
  background: #ffffff;
  border: none;
  border-radius: 8px;
  color: #0a0a0a;
  font-weight: 600;
  font-size: 1rem;
}

@media (max-width: 1024px) {
  .listing-layout {
    grid-template-columns: 1fr;
  }
  
  .listing-gallery {
    position: static;
  }
  
  .category-layout {
    grid-template-columns: 1fr;
  }
  
  .filters-sidebar {
    position: static;
  }
  
  .cart-layout {
    grid-template-columns: 1fr;
  }
  
  .cart-summary {
    position: static;
  }
}

@media (max-width: 768px) {
  .storefront-header {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  
  .store-name {
    font-size: 2rem;
  }
  
  .storefront-nav .container {
    overflow-x: auto;
    gap: 1rem;
  }
  
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .marketplace-title {
    font-size: 1.75rem;
  }
  
  .category-card {
    padding: 1.5rem;
  }
  
  .product-content,
  .service-content {
    padding: 1rem;
  }
  
  .listing-title {
    font-size: 1.5rem;
  }
  
  .price {
    font-size: 1.5rem;
  }
  
  .listing-actions {
    flex-direction: column;
  }
}
