/*
Theme Name: MeritGig Marketplace
Theme URI: https://meritcom.shop/meritgig
Author: Meritcom
Author URI: https://maritcom.com
Description: Ultra-fast, 1-click installable Fiverr-style WooCommerce freelance service marketplace theme with Live Dropdown Visual Customizer, 50 pre-loaded gigs, 5 SEO blog posts, multi-slot AdSense zones, and WhatsApp/Telegram/WeChat/Imo floating chat widget.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: meritgig
Tags: e-commerce, marketplace, custom-colors, custom-menu, featured-images, theme-options
*/

:root {
  --mg-primary: #0047AB;
  --mg-secondary: #00A3E0;
  --mg-accent: #00A859;
  --mg-gold: #FFB800;
  --mg-pink: #FF2E93;
  --mg-bg: #FFFFFF;
  --mg-surface: #F0F7FF;
  --mg-text: #0F294A;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--mg-bg);
  color: var(--mg-text);
  line-height: 1.6;
}
a { color: var(--mg-primary); text-decoration: none; }
.mg-container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* Header */
.mg-header {
  background: #FFFFFF;
  border-bottom: 2px solid #E2EEFF;
  position: sticky;
  top: 0;
  z-index: 999;
  padding: 14px 0;
}
.mg-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.mg-logo {
  font-size: 26px;
  font-weight: 800;
  color: var(--mg-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.mg-logo span { color: var(--mg-accent); }

/* Hero */
.mg-hero {
  background: linear-gradient(135deg, var(--mg-primary) 0%, var(--mg-secondary) 100%);
  color: #FFFFFF;
  padding: 64px 20px;
  border-radius: 0 0 24px 24px;
}
.mg-hero h1 { font-size: 42px; font-weight: 800; margin-bottom: 14px; }
.mg-search-bar {
  display: flex;
  max-width: 640px;
  background: #FFFFFF;
  border-radius: 12px;
  overflow: hidden;
  padding: 6px;
  margin-top: 20px;
}
.mg-search-bar input {
  flex: 1;
  border: none;
  padding: 12px 16px;
  font-size: 16px;
  outline: none;
}
.mg-search-bar button {
  background: var(--mg-accent);
  color: #FFFFFF;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

/* Gig Grid */
.mg-grid {
  display: grid;
  grid-template-columns: repeat(var(--mg-cols, 4), 1fr);
  gap: 24px;
  margin: 32px 0;
}
.mg-card {
  background: #FFFFFF;
  border: 1.5px solid #DCEBFF;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mg-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 71, 171, 0.12);
}
.mg-card-thumb {
  height: 170px;
  background: linear-gradient(120deg, var(--mg-primary), var(--mg-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 700;
  padding: 16px;
  text-align: center;
}
.mg-card-body { padding: 16px; }
.mg-badge {
  display: inline-block;
  background: #E6F4FF;
  color: var(--mg-primary);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 8px;
}
.mg-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #EEF5FF;
}
.mg-price { font-size: 18px; font-weight: 800; color: var(--mg-accent); }

/* AdSense Slots */
.mg-ad-slot {
  background: #F4F9FF;
  border: 2px dashed #99C7FF;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  margin: 20px 0;
  color: #0047AB;
  font-weight: 600;
}

/* Live Dropdown Visual Customizer Bar */
#mg-live-bar {
  background: #003380;
  color: #FFFFFF;
  padding: 10px 20px;
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
#mg-live-bar select, #mg-live-bar input[type="color"] {
  border-radius: 6px;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
}

/* Floating Multi-Chat Widget */
.mg-chat-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}
.mg-chat-btn {
  padding: 10px 16px;
  border-radius: 99px;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 6px 16px rgba(0, 71, 171, 0.25);
}
.mg-wa { background: #00A859; }
.mg-tg { background: #00A3E0; }
.mg-wc { background: #0047AB; }
.mg-imo { background: #FF2E93; }

@media (max-width: 960px) { .mg-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .mg-grid { grid-template-columns: 1fr; } }
