/* ==========================================================================
   CodeX Link - Digital Tools Marketplace Stylesheet
   Theme: Premium Emerald / Dark Teal & Modern Glassmorphism
   ========================================================================== */

:root {
  --mp-emerald: #00d084;
  --mp-emerald-hover: #059669;
  --mp-emerald-light: rgba(0, 208, 132, 0.12);
  --mp-emerald-glow: rgba(0, 208, 132, 0.35);
  --mp-dark-hero: #03140f;
  --mp-dark-hero-2: #062b20;
  --mp-dark-hero-3: #0b3d2e;
  --mp-card-bg: #ffffff;
  --mp-card-border: #e8ecef;
  --mp-card-hover-border: #00d084;
  --mp-text-dark: #111827;
  --mp-text-muted: #6b7280;
  --mp-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base resets & typography for marketplace section */
.marketplace-page {
  font-family: var(--mp-font-sans);
  color: var(--mp-text-dark);
  background-color: #f8fafc;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Hero Section - Modern Emerald Theme with Transparent Right Showcase
   -------------------------------------------------------------------------- */
.mp-hero-section {
  position: relative;
  background: linear-gradient(135deg, #02120e 0%, #062b20 45%, #0a3d2e 80%, #03140f 100%);
  min-height: 560px;
  padding: 85px 0 100px 0;
  color: #ffffff;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.mp-hero-section::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -5%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(0, 255, 196, 0.16) 0%, transparent 65%);
  pointer-events: none;
  z-index: 1;
  filter: blur(50px);
}

.mp-hero-section::after {
  content: '';
  position: absolute;
  bottom: -15%;
  left: 0;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  filter: blur(60px);
}

.mp-hero-container {
  position: relative;
  z-index: 2;
}

/* Pill badge */
.mp-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px;
  background: rgba(0, 45, 32, 0.75);
  border: 1px solid rgba(0, 255, 196, 0.45);
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #00ffc4;
  box-shadow: 0 0 20px rgba(0, 255, 196, 0.2);
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}

/* Hero Heading */
.mp-hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin-bottom: 18px;
}

.mp-gradient-text {
  color: #00ffc4 !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
}

/* Hero Subtitle */
.mp-hero-subtitle {
  font-size: 15.5px;
  line-height: 1.65;
  color: #d1d5db;
  max-width: 480px;
  margin-bottom: 34px;
  font-weight: 400;
}

/* Hero Actions */
.mp-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.mp-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #00dfa2 !important;
  color: #022017 !important;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 12px;
  border: none;
  box-shadow: 0 6px 24px rgba(0, 223, 162, 0.4);
  transition: all 0.25s ease;
  text-decoration: none;
  cursor: pointer;
}

.mp-btn-primary:hover {
  background: #00ffc4 !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 255, 196, 0.5);
  color: #022017 !important;
}

.mp-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.5);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
  text-decoration: none;
  cursor: pointer;
}

.mp-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
  transform: translateY(-2px);
  color: #ffffff !important;
}

.mp-btn-secondary .play-icon-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  color: #03140f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  padding-left: 2px;
}

/* Trust features list */
.mp-trust-features {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 10px;
}

.mp-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #e5e7eb;
}

.mp-trust-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 255, 196, 0.12);
  border: 1px solid rgba(0, 255, 196, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00ffc4;
  font-size: 13px;
  flex-shrink: 0;
}

/* Hero Right Transparent Showcase Image */
.mp-hero-showcase-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.mp-hero-showcase-img {
  width: 100%;
  max-width: 660px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mp-hero-showcase-img:hover {
  transform: translateY(-5px) scale(1.02);
}

@media (max-width: 991px) {
  .mp-hero-section {
    padding: 60px 0 80px 0;
  }
  .mp-hero-showcase-img {
    max-width: 480px;
    margin-top: 30px;
  }
  .mp-hero-title {
    font-size: 34px;
  }
}

/* --------------------------------------------------------------------------
   Filter & Search Control Hub (Floating Bar)
   -------------------------------------------------------------------------- */
.mp-search-container {
  margin-top: -38px;
  position: relative;
  z-index: 10;
  padding: 0 15px;
}

.mp-search-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
  padding: 14px 20px;
  border: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.mp-search-input-group {
  flex: 1 1 300px;
  position: relative;
  display: flex;
  align-items: center;
}

.mp-search-icon {
  position: absolute;
  left: 16px;
  color: #94a3b8;
  font-size: 16px;
  pointer-events: none;
}

.mp-search-input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
  font-size: 14px;
  color: #1e293b;
  outline: none;
  transition: all 0.25s ease;
}

.mp-search-input:focus {
  background-color: #ffffff;
  border-color: #00d084;
  box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.15);
}

.mp-search-select-group {
  flex: 0 0 auto;
  min-width: 140px;
}

.mp-search-select {
  width: 100%;
  padding: 13px 36px 13px 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
  font-size: 14px;
  color: #334155;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  transition: all 0.25s ease;
}

.mp-search-select:focus {
  background-color: #ffffff;
  border-color: #00d084;
  box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.15);
}

.mp-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  background: linear-gradient(135deg, #00d084 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(0, 208, 132, 0.3);
  white-space: nowrap;
}

.mp-search-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 208, 132, 0.4);
}

/* --------------------------------------------------------------------------
   Category Pill Tabs
   -------------------------------------------------------------------------- */
.mp-categories-bar {
  padding: 36px 0 24px 0;
}

.mp-pills-list {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.mp-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.mp-pill-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
  transform: translateY(-2px);
}

.mp-pill-item.active {
  background: #00d084;
  border-color: #00d084;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 208, 132, 0.35);
}

.mp-pill-item i {
  font-size: 14px;
}

.mp-pill-item.active i {
  color: #ffffff !important;
}

.mp-pill-count {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 7px;
  border-radius: 9999px;
  font-weight: 700;
}

.mp-pill-item.active .mp-pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Category specific icon colors */
.mp-ico-ai { color: #10a37f; }
.mp-ico-design { color: #8b5cf6; }
.mp-ico-mkt { color: #ec4899; }
.mp-ico-biz { color: #f59e0b; }
.mp-ico-prod { color: #6366f1; }
.mp-ico-dev { color: #0284c7; }
.mp-ico-oth { color: #64748b; }

/* --------------------------------------------------------------------------
   Section Heading
   -------------------------------------------------------------------------- */
.mp-catalog-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 12px;
}

.mp-catalog-title {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.mp-catalog-subtitle {
  font-size: 14.5px;
  color: #64748b;
  margin: 0;
}

.mp-view-all-link {
  font-size: 14px;
  font-weight: 700;
  color: #00d084;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.mp-view-all-link:hover {
  color: #059669;
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Product Cards Grid
   -------------------------------------------------------------------------- */
.mp-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}

@media (max-width: 991px) {
  .mp-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Card item */
.mp-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e9eff5;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.mp-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 208, 132, 0.4);
  box-shadow: 0 16px 36px rgba(0, 208, 132, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* Card Header */
.mp-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.mp-card-logo-box {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.mp-card:hover .mp-card-logo-box {
  transform: scale(1.05);
}

.mp-card-logo-box img,
.mp-card-logo-box svg {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.mp-card-title-group {
  flex: 1;
}

.mp-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 4px;
}

.mp-card-category-tag {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Card Body */
.mp-card-body {
  flex: 1;
  margin-bottom: 16px;
}

.mp-card-desc {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.55;
  margin-bottom: 16px;
  min-height: 42px;
}

/* Stock Badge */
.mp-stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 8px;
}

.mp-stock-dot {
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
  animation: mpPulse 2s infinite;
}

@keyframes mpPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.mp-card-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 6px;
  margin-bottom: 16px;
}

.mp-card-price {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.mp-card-price small {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

/* Card Actions */
.mp-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.mp-btn-learn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0284c7;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.mp-btn-learn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0369a1;
  transform: translateY(-1px);
}

.mp-btn-chat {
  flex: 1.35;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  background: #00d084;
  border: 1px solid #00d084;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.mp-btn-chat:hover {
  background: #059669;
  border-color: #059669;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 208, 132, 0.35);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Interactive Modal for "Learn More" & Tool Details
   -------------------------------------------------------------------------- */
.mp-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mp-modal-backdrop.show {
  display: flex;
  opacity: 1;
}

.mp-modal-content {
  background: #ffffff;
  border-radius: 24px;
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid #e2e8f0;
  position: relative;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 32px;
}

.mp-modal-backdrop.show .mp-modal-content {
  transform: scale(1);
}

.mp-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mp-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Feature tags inside modal */
.mp-features-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 575px) {
  .mp-features-list {
    grid-template-columns: 1fr;
  }
}

.mp-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #334155;
}

.mp-feature-item i {
  color: #00d084;
  font-size: 14px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   How It Works Section
   -------------------------------------------------------------------------- */
.mp-how-it-works {
  background: #ffffff;
  border-radius: 24px;
  padding: 50px 40px;
  margin-bottom: 70px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.03);
  border: 1px solid #edf2f7;
}

.mp-step-card {
  text-align: center;
  padding: 20px 15px;
  position: relative;
}

.mp-step-num {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px auto;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(0, 208, 132, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
  border: 1px solid rgba(0, 208, 132, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #059669;
}

.mp-step-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.mp-step-desc {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

/* --------------------------------------------------------------------------
   CTA Banner Section
   -------------------------------------------------------------------------- */
.mp-cta-banner {
  background: linear-gradient(135deg, #02120e 0%, #062b20 50%, #0b3d2e 100%);
  border-radius: 24px;
  padding: 50px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(6, 43, 32, 0.25);
  margin-bottom: 80px;
}

.mp-cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 208, 132, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

/* Responsive adjust */
@media (max-width: 768px) {
  .mp-hero-title {
    font-size: 32px;
  }
  .mp-hero-section {
    padding: 60px 0 70px 0;
  }
  .mp-search-card {
    flex-direction: column;
    align-items: stretch;
  }
  .mp-search-select-group {
    width: 100%;
  }
  .mp-search-btn {
    width: 100%;
  }
  .mp-cta-banner {
    padding: 30px 20px;
  }
}
