/*
Theme Name: Marketplace Pro
Theme URI: #
Author: Custom Build
Description: Theme profesional per marketplace freelancerash - Light & Clean
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: Private
Text Domain: marketplace-pro
Tags: elementor, dokan, woocommerce, marketplace, freelance
*/

/* =====================================================
   IMPORT FONTS
===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Outfit:wght@300;400;500;600&display=swap');

/* =====================================================
   CSS VARIABLES
===================================================== */
:root {
  --primary:       #1A56DB;
  --primary-dark:  #1344B8;
  --primary-light: #EBF2FF;
  --accent:        #FF6B35;
  --accent-light:  #FFF1EC;
  --success:       #10B981;
  --warning:       #F59E0B;
  --danger:        #EF4444;

  --bg:            #FAFBFC;
  --bg-card:       #FFFFFF;
  --bg-section:    #F3F6FB;

  --text:          #111827;
  --text-muted:    #6B7280;
  --text-light:    #9CA3AF;

  --border:        #E5E9EF;
  --border-dark:   #D1D5DB;

  --radius-sm:     6px;
  --radius:        12px;
  --radius-lg:     20px;
  --radius-full:   9999px;

  --shadow-sm:     0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:        0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:     0 8px 32px rgba(0,0,0,0.12);
  --shadow-primary: 0 4px 20px rgba(26,86,219,0.25);

  --font-head:     'Syne', sans-serif;
  --font-body:     'Outfit', sans-serif;

  --transition:    0.2s ease;
  --transition-md: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================
   RESET & BASE
===================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin-bottom: 1rem; color: var(--text-muted); }
p:last-child { margin-bottom: 0; }

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

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

/* =====================================================
   LAYOUT
===================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* =====================================================
   COMPONENTS — BUTTONS
===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-md);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(26,86,219,0.35);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover {
  background: #e55a28;
  border-color: #e55a28;
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--bg-section);
  border-color: var(--border-dark);
}

.btn-sm { padding: 7px 16px; font-size: 0.875rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

/* =====================================================
   COMPONENTS — CARDS
===================================================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  transition: all var(--transition-md);
}

.card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-flat {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
}

/* =====================================================
   COMPONENTS — BADGE
===================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-accent  { background: var(--accent-light);  color: var(--accent); }
.badge-success { background: #ECFDF5; color: var(--success); }
.badge-warning { background: #FFFBEB; color: var(--warning); }

/* =====================================================
   COMPONENTS — FORM ELEMENTS
===================================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group { margin-bottom: 20px; }

/* =====================================================
   HEADER
===================================================== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

#site-header.scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.site-logo {
  font-family: var(--font-head);
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo span { color: var(--primary); }

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 7px 14px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--primary);
  background: var(--primary-light);
}

/* Header Search */
.header-search {
  flex: 1;
  max-width: 380px;
  position: relative;
}

.header-search input {
  padding-left: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
}

.header-search .search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text);
}

@media (max-width: 768px) {
  .site-nav, .header-search { display: none; }
  .nav-toggle { display: flex; }
}

/* =====================================================
   FOOTER
===================================================== */
#site-footer {
  background: #0F172A;
  color: #CBD5E1;
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand .site-logo { color: #fff; }
.footer-brand p { color: #94A3B8; margin-top: 12px; font-size: 0.9rem; }

.footer-col h5 {
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: #94A3B8;
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color var(--transition);
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid #1E293B;
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.85rem;
  color: #64748B;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   HOMEPAGE — HERO
===================================================== */
.hero {
  padding: 96px 0 80px;
  background: linear-gradient(160deg, #FAFBFC 0%, #EBF2FF 60%, #FAFBFC 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(26,86,219,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  margin-bottom: 18px;
  color: var(--text);
}

.hero h1 strong {
  color: var(--primary);
  font-weight: 800;
}

.hero p {
  font-size: 1.0625rem;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.hero-stat-num {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.hero-stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

.hero-visual {
  position: relative;
}

.hero-card-stack {
  position: relative;
  display: flex;
  justify-content: center;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}

/* =====================================================
   HOMEPAGE — CATEGORIES
===================================================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.category-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-md);
  text-decoration: none;
}

.category-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.category-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--bg-section);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.5rem;
  transition: background var(--transition);
}

.category-card:hover .category-icon {
  background: rgba(26,86,219,0.15);
}

.category-card h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.category-card span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

@media (max-width: 900px) { .categories-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .categories-grid { grid-template-columns: 1fr 1fr; } }

/* =====================================================
   FREELANCER CARDS
===================================================== */
.freelancer-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all var(--transition-md);
}

.freelancer-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: transparent;
}

.freelancer-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg-section);
}

.freelancer-card-body {
  padding: 18px;
}

.freelancer-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.freelancer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.freelancer-name {
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  display: block;
}

.freelancer-title {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.freelancer-card-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  margin: 8px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.freelancer-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.rating-star { color: #F59E0B; font-size: 0.875rem; }

.price-label { font-size: 0.75rem; color: var(--text-muted); }
.price-amount {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* =====================================================
   DOKAN OVERRIDES
===================================================== */

/* Dashboard sidebar */
.dokan-dashboard-wrap .dokan-dash-sidebar {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.dokan-dashboard-wrap .dokan-dash-sidebar ul li a {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-muted);
  padding: 10px 20px;
  transition: all var(--transition);
}

.dokan-dashboard-wrap .dokan-dash-sidebar ul li a:hover,
.dokan-dashboard-wrap .dokan-dash-sidebar ul li.active a {
  color: var(--primary);
  background: var(--primary-light);
}

/* Dokan store header */
.dokan-store-header {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Dokan forms */
.dokan-form-group label { font-family: var(--font-body); }
.dokan-form-group .dokan-form-control {
  border-radius: var(--radius-sm);
  border-color: var(--border);
  font-family: var(--font-body);
}

/* Dokan buttons */
.dokan-btn-primary,
.dokan-btn-theme {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  border-radius: var(--radius-full) !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
}

.dokan-btn-primary:hover,
.dokan-btn-theme:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

/* Vendor profile page */
.dokan-store-wrap .dokan-store-name {
  font-family: var(--font-head);
  font-weight: 800;
}

/* Product listing cards */
.dokan-product-listing .dokan-product-listing-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* =====================================================
   WOOCOMMERCE OVERRIDES
===================================================== */
.woocommerce .button,
.woocommerce-cart .checkout-button,
.woocommerce #respond input#submit {
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: var(--radius-full) !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  border: none !important;
  padding: 11px 24px !important;
}

.woocommerce .button:hover { background: var(--primary-dark) !important; }

.woocommerce-message,
.woocommerce-info {
  border-top-color: var(--primary) !important;
  background: var(--primary-light) !important;
}

.woocommerce-error { border-top-color: var(--danger) !important; }

/* Cart & Checkout */
.woocommerce table.shop_table {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  overflow: hidden !important;
}

/* =====================================================
   SECTION TITLES
===================================================== */
.section-title {
  margin-bottom: 48px;
}

.section-title .label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.section-title h2 { margin-bottom: 12px; }

.section-title p {
  max-width: 520px;
  font-size: 1rem;
}

/* =====================================================
   HOW IT WORKS
===================================================== */
.step-card {
  text-align: center;
  padding: 32px 24px;
}

.step-num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-primary);
}

.step-card h4 { margin-bottom: 8px; }

/* =====================================================
   CTA BANNER
===================================================== */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #1344B8 100%);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.cta-banner h2 { color: #fff; margin-bottom: 12px; }
.cta-banner p { color: rgba(255,255,255,0.75); margin-bottom: 28px; font-size: 1rem; }

.cta-banner .btn-white {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
  font-weight: 700;
}
.cta-banner .btn-white:hover {
  background: rgba(255,255,255,0.9);
  color: var(--primary);
}

/* =====================================================
   TRUST BADGES
===================================================== */
.trust-bar {
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.trust-items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.trust-item-icon { font-size: 1.125rem; }

/* =====================================================
   PROFILE PAGE (FREELANCER)
===================================================== */
.profile-header {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: start;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: var(--shadow);
}

.profile-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--success);
  font-weight: 600;
}

.profile-online::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
}

/* =====================================================
   UTILITY CLASSES
===================================================== */
.text-center  { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-muted); }
.text-sm      { font-size: 0.875rem; }

.bg-section   { background: var(--bg-section); }
.bg-primary   { background: var(--primary); }

.font-head    { font-family: var(--font-head); }
.font-bold    { font-weight: 700; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.flex         { display: flex; }
.items-center { align-items: center; }
.gap-2        { gap: 8px; }
.gap-3        { gap: 12px; }
.gap-4        { gap: 16px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

/* =====================================================
   ANIMATIONS
===================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-fade-up  { animation: fadeUp 0.5s ease both; }
.animate-fade-in  { animation: fadeIn 0.4s ease both; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* =====================================================
   RESPONSIVE MISC
===================================================== */
@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .hero { padding: 60px 0 48px; }
  .hero-stats { gap: 20px; }
  .cta-banner { padding: 40px 24px; }
  .profile-header { grid-template-columns: 1fr; }
}
