/* ----------------------------------------------------
   Montería Vende - Main Stylesheet
   Modern, Dark Glassmorphism, Emerald & Warm Gold Theme
---------------------------------------------------- */

:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Color Palette */
  --bg-dark: #090d16;
  --bg-card: rgba(21, 30, 47, 0.75);
  --bg-card-hover: rgba(30, 43, 67, 0.9);
  --bg-surface: #131c2e;
  
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.3);
  
  --accent: #f59e0b;
  --accent-hover: #d97706;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(16, 185, 129, 0.4);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(12px);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--primary-hover);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), #047857);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.logo-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}
.brand-accent {
  color: var(--primary);
}
.brand-tagline {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.nav-link.active {
  color: var(--primary);
  font-weight: 600;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #059669);
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #10b981, #047857);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
  color: #fff;
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: translateY(-2px);
}

/* Main Content */
.main-content {
  flex: 1;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 5rem 1.5rem 4rem;
  background: radial-gradient(circle at top center, rgba(16, 185, 129, 0.15), transparent 70%),
              radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.08), transparent 50%);
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}
.hero-container {
  max-width: 900px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 1.25rem;
  letter-spacing: -1px;
}
.hero-title .gradient-text {
  background: linear-gradient(135deg, #34d399, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

/* Search Box */
.search-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  max-width: 720px;
  margin: 0 auto 2rem;
}
.search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-left: 1rem;
}
.search-input-wrapper i {
  color: var(--text-dim);
  font-size: 1.1rem;
}
.search-input {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-body);
}
.search-input::placeholder {
  color: var(--text-dim);
}

/* Stats Container */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}
.stat-item {
  display: flex;
  flex-direction: column;
}
.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: 4rem 1.5rem;
}
.section-container {
  max-width: 1240px;
  margin: 0 auto;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
}
.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* Category Cards Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 1.25rem;
}
.category-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.category-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.category-icon {
  width: 52px;
  height: 52px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
  transition: var(--transition);
}
.category-card:hover .category-icon {
  background: var(--primary);
  color: #fff;
}
.category-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
}

/* Business Grid & Card */
.business-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.75rem;
}
.business-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.business-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.card-category-badge {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.card-rating {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}
.card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.verified-icon {
  color: #3b82f6;
  font-size: 1rem;
}
.card-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.card-meta-item i {
  color: var(--primary);
  width: 16px;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.tag {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
}
.card-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}
.btn-whatsapp {
  background: #25d366;
  color: #fff;
  flex: 1;
  justify-content: center;
}
.btn-whatsapp:hover {
  background: #1da851;
  color: #fff;
}

/* Call to Action Banner */
.cta-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(16, 185, 129, 0.35)),
              url('https://images.unsplash.com/photo-1556740758-90de374c12ad?auto=format&fit=crop&w=1200&q=80') center/cover;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  margin-top: 2rem;
}
.cta-content {
  max-width: 650px;
  margin: 0 auto;
}
.cta-title {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
}

/* Footer */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  margin-top: 5rem;
}
.footer-top {
  padding: 4rem 1.5rem;
}
.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
}
.footer-logo i {
  color: var(--primary);
}
.footer-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
  max-width: 320px;
}
.social-links {
  display: flex;
  gap: 0.75rem;
}
.social-links a {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.social-links a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.footer-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
}
.footer-links, .footer-info {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.92rem;
}
.footer-links a {
  color: var(--text-muted);
}
.footer-links a:hover {
  color: #fff;
  padding-left: 4px;
}
.footer-info li {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.footer-info i {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-dim);
}
.heart-icon {
  color: #ef4444;
}

/* Grid Utilities for Responsive Layouts */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.category-filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 3rem;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .hero-title { 
    font-size: 2.6rem; 
  }
  .footer-container { 
    grid-template-columns: 1fr 1fr; 
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .grid-2col,
  .form-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .category-filter-bar {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0.25rem 0.25rem 0.75rem;
    margin-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .category-filter-bar::-webkit-scrollbar {
    height: 4px;
  }
  .category-filter-bar::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.3);
    border-radius: 4px;
  }
  .category-filter-bar .cat-filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(19, 28, 46, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  }
  .site-nav.open { 
    display: flex; 
    animation: fadeInDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  .site-nav .nav-link {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
  .site-nav .nav-cta {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
  }
  .nav-toggle { 
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
  }

  .hero-section {
    padding: 3.5rem 1.25rem 3rem;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  .hero-stats { 
    flex-direction: column; 
    gap: 1.25rem; 
    margin-top: 2rem;
    padding-top: 1.5rem;
  }
  .stat-item {
    align-items: center;
  }

  .section {
    padding: 3rem 1.25rem;
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.75rem;
  }
  .section-header .btn {
    align-self: flex-start;
  }
  .section-title {
    font-size: 1.75rem;
  }

  .footer-container { 
    grid-template-columns: 1fr; 
    gap: 2.5rem;
  }
  .footer-top {
    padding: 3rem 1.25rem;
  }
}

@media (max-width: 640px) {
  .search-box {
    flex-direction: column;
    padding: 0.75rem;
    gap: 0.75rem;
    border-radius: var(--radius-md);
  }
  .search-input-wrapper {
    width: 100%;
    padding-left: 0.25rem;
  }
  .search-box .btn {
    width: 100%;
    justify-content: center;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .category-card {
    padding: 1.25rem 0.75rem;
  }
  .category-name {
    font-size: 0.9rem;
  }
  .category-icon {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  .cta-banner {
    padding: 2.5rem 1.25rem;
    border-radius: var(--radius-md);
  }
  .cta-title {
    font-size: 1.75rem;
  }

  .business-card {
    padding: 1.25rem;
  }
  .card-title {
    font-size: 1.2rem;
  }
  .card-actions {
    flex-direction: column;
  }
}

@media (max-width: 400px) {
  .hero-title {
    font-size: 1.85rem;
  }
  .brand-tagline {
    display: none;
  }
  .brand-name {
    font-size: 1.2rem;
  }
  .logo-icon {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ----------------------------------------------------
   Marketplace Layout & Components
---------------------------------------------------- */
.marketplace-section {
  padding-top: 2rem;
}

.marketplace-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Sidebar */
.marketplace-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: 90px;
  backdrop-filter: var(--glass-blur);
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.sidebar-title i {
  color: var(--primary);
}

.sidebar-search-box {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.sidebar-search-box i {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.sidebar-search-input {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

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

.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 50px;
  width: 100%;
  justify-content: center;
}

.mkt-sell-btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.sidebar-divider {
  height: 1px;
  background: var(--border-color);
  margin: 1.25rem 0;
}

.sidebar-subtitle {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.85rem;
}

.mkt-categories-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mkt-cat-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  width: 100%;
}

.mkt-cat-btn i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  color: var(--text-dim);
  transition: var(--transition);
}

.mkt-cat-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.mkt-cat-btn:hover i {
  color: var(--primary);
}

.mkt-cat-btn.active {
  background: rgba(16, 185, 129, 0.15);
  color: #fff;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.mkt-cat-btn.active i {
  color: var(--primary);
}

/* Marketplace Main Content */
.mkt-main-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.mkt-main-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.mkt-main-sub {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.2rem;
}

.mkt-badge-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
}

/* Marketplace Grid */
.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.mkt-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.mkt-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.mkt-card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 80%; /* aspect ratio 5:4 */
  background: var(--bg-surface);
  overflow: hidden;
}

.mkt-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.mkt-card:hover .mkt-card-img {
  transform: scale(1.06);
}

.mkt-card-tag {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.mkt-card-tag.tag-free {
  background: #10b981;
  color: #fff;
  border: none;
}

.mkt-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.mkt-card-price {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.mkt-card-title {
  font-size: 0.93rem;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mkt-card-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.4rem;
}

.mkt-card-location i {
  color: var(--primary);
}

/* Modal Dialog */
.mkt-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mkt-modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.mkt-modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
  animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mkt-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition);
}

.mkt-modal-close:hover {
  background: #ef4444;
  color: #fff;
}

.mkt-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.mkt-modal-media {
  background: #000;
  display: flex;
  flex-direction: column;
  min-height: 350px;
}

.mkt-modal-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.mkt-modal-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.mkt-modal-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.mkt-modal-price {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.mkt-modal-meta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.mkt-meta-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.mkt-meta-row i {
  color: var(--primary);
}

.mkt-modal-desc-wrap h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.4rem;
}

.mkt-modal-desc-wrap p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

.mkt-modal-actions {
  margin-top: auto;
}

.mkt-wsp-btn {
  width: 100%;
  justify-content: center;
  padding: 0.9rem;
  font-size: 1rem;
}

/* Marketplace Responsive Rules */
@media (max-width: 992px) {
  .marketplace-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .marketplace-sidebar {
    position: static;
    padding: 1.25rem;
  }
  .mkt-categories-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }
  .mkt-cat-btn {
    white-space: nowrap;
    width: auto;
    flex-shrink: 0;
  }
  .sidebar-divider {
    display: none;
  }
  .mkt-modal-grid {
    grid-template-columns: 1fr;
  }
  .mkt-modal-media img {
    max-height: 300px;
  }
}

@media (max-width: 576px) {
  .marketplace-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .mkt-card-body {
    padding: 0.75rem;
  }
  .mkt-card-price {
    font-size: 1.05rem;
  }
  .mkt-card-title {
    font-size: 0.85rem;
  }
  .mkt-main-title {
    font-size: 1.4rem;
  }
  .mkt-modal-dialog {
    margin: 0.5rem;
  }
  .mkt-modal-info {
    padding: 1.25rem;
  }
}

/* ----------------------------------------------------
   Marketplace Slider & ImgBB Dropzone
---------------------------------------------------- */

/* Slider container inside modal media */
.mkt-slider-container {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}

.mkt-slider-container #mktModalImg {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  transition: opacity 0.25s ease;
  display: block;
}

.mkt-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(9, 13, 22, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
}

.mkt-slider-arrow:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.mkt-slider-arrow.prev { left: 0.75rem; }
.mkt-slider-arrow.next { right: 0.75rem; }

.mkt-slider-arrow.hidden {
  display: none;
}

.mkt-slider-badge {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  background: rgba(9, 13, 22, 0.75);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Thumbnail strip — horizontal row below image */
.mkt-slider-thumbs {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 8px 10px;
  background: #0a0e1a;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border-highlight) transparent;
  width: 100%;
  box-sizing: border-box;
}

.mkt-slider-thumbs::-webkit-scrollbar {
  height: 4px;
}
.mkt-slider-thumbs::-webkit-scrollbar-track { background: transparent; }
.mkt-slider-thumbs::-webkit-scrollbar-thumb {
  background: var(--border-highlight);
  border-radius: 4px;
}

.mkt-thumb-btn {
  width: 64px;
  height: 60px;
  flex-shrink: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  transition: all 0.2s ease;
  padding: 0;
  background: none;
}

.mkt-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mkt-thumb-btn:hover {
  opacity: 0.85;
  border-color: var(--primary);
}

.mkt-thumb-btn.active {
  opacity: 1;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
}

/* Single image — hide arrows and counter */
.mkt-slider-single .mkt-slider-arrow,
.mkt-slider-single .mkt-slider-badge {
  display: none;
}

/* ImgBB Dropzone */
.imgbb-dropzone {
  border: 2px dashed var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 1.75rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(16, 185, 129, 0.03);
}

.imgbb-dropzone:hover,
.imgbb-dropzone.drag-over {
  background: rgba(16, 185, 129, 0.08);
  border-color: var(--primary);
}

.imgbb-dropzone i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: block;
}

.imgbb-dropzone p {
  font-size: 0.92rem;
  color: #fff;
  margin-bottom: 0.2rem;
}

.imgbb-dropzone span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Image preview grid in publish form */
.imgbb-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.75rem;
}

.imgbb-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border-color);
}

.imgbb-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.imgbb-preview-item .preview-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.imgbb-preview-item .preview-spinner {
  position: absolute;
  inset: 0;
  background: rgba(9, 13, 22, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.25rem;
}

.imgbb-preview-item.uploading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  animation: progressSlide 1.5s ease-in-out infinite;
}

@keyframes progressSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.imgbb-upload-status {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

