/* ==========================================================================
   Login Computer — MARKETPLACE SPECIFIC STYLES
   Super Solid & Premium Grid Layout (According to Main Theme)
   ========================================================================== */

/* ---- Marketplace Section Header ---- */
.marketplace-hero {
  padding: 4rem 0 3rem;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(22, 163, 74, 0.04), transparent 60%);
}

/* ---- Premium Search System ---- */
.search-container {
  max-width: 680px;
  margin: 2rem auto;
  position: relative;
  padding: 0 1rem;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 1.15rem 1.5rem 1.15rem 3.5rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.1a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 1.25rem center;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.15), var(--shadow);
  transform: translateY(-2px);
}

/* ---- Modern Filter & Category Bar ---- */
.filter-container {
  margin-bottom: 3.5rem;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none; /* Firefox */
}

.filter-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.filter-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  min-width: max-content;
  margin: 0 auto;
  padding: 4px;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  transition: var(--transition);
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.25);
}

/* ==========================================================================
   PRODUCT & MARKETPLACE GRID SYSTEM
   ========================================================================== */
.marketplace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 5rem;
}

/* ---- Premium Miniature & Main Product Cards ---- */
.mini-product-card, .product-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  transition: var(--transition);
}

/* Advanced Hover Controls */
.mini-product-card:hover, .product-card:hover {
  transform: translateY(-12px) scale(1.015);
  box-shadow: var(--shadow-lg);
  border-color: rgba(22, 163, 74, 0.2);
}

/* Product Media & Badge Styles */
.product-image-wrapper {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: var(--bg-alt);
}

.product-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mini-product-card:hover .product-image-wrapper img,
.product-card:hover .product-image-wrapper img {
  transform: scale(1.08);
}

.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Card Body Content */
.product-details {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.75rem;
  transition: color var(--transition);
}

.product-card:hover .product-title {
  color: var(--primary);
}

.product-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Card Action Footer */
.product-action-footer {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.marketplace-price {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 0.75rem;
  color: var(--text-subtle);
  font-weight: 600;
  text-transform: uppercase;
}

.price-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.price-amount span {
  color: var(--primary);
}

/* Marketplace Action Button */
.buy-now-btn {
  background: var(--primary);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.2);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.buy-now-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.35);
  color: #ffffff;
}

/* ==========================================================================
   RESPONSIVE LAYOUT BREAKPOINTS FOR MARKETPLACE
   ========================================================================== */
@media (min-width: 576px) {
  .marketplace-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 992px) {
  .marketplace-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 1200px) {
  .marketplace-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .marketplace-hero {
    padding: 3rem 0 1.5rem;
  }
  .filter-bar {
    justify-content: flex-start;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .product-image-wrapper {
    height: 210px;
  }
}