/* ===== index.css – Shophive Homepage (edge‑to‑edge mobile, two‑column grids) ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #4361ee;
  --primary-dark: #3a56d4;
  --secondary: #ff6b6b;
  --accent: #f9c74f;
  --success: #4caf50;
  --dark: #1e293b;
  --gray-900: #0f172a;
  --gray-800: #334155;
  --gray-700: #475569;
  --gray-600: #64748b;
  --gray-500: #94a3b8;
  --gray-400: #cbd5e1;
  --gray-300: #e2e8f0;
  --gray-200: #f1f5f9;
  --gray-100: #f8fafc;
  --white: #ffffff;
  --bg-light: #f8fafc;

  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.07);
  --shadow-hover: 0 20px 30px -10px rgba(67, 97, 238, 0.2);
  --transition: all 0.2s ease;

  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-light);
  color: var(--dark);
  line-height: 1.5;
  overflow-x: hidden;
  width: 100%;
}

/* ===== MARKETPLACE CONTAINER – edge‑to‑edge ===== */
.marketplace-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
  width: 100%;
}

/* ===== MOBILE FIRST – hide desktop elements ===== */
.top-nav,
.marketplace-header,
.sidebar {
  display: none;
}

/* ----- Mobile Header (sticky, edge‑to‑edge) ----- */
.mobile-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-300);
  padding: 0.75rem 0;
  width: 100%;
  box-shadow: var(--shadow-sm);
}

.mobile-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 1rem;               /* inner padding for tap targets */
}

.mobile-action-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--gray-800);
  padding: 0.25rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  position: relative;
}
.mobile-action-btn:hover { color: var(--primary); }

.mobile-logo {
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
}

.mobile-actions {
  display: flex;
  gap: 1rem;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--secondary);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ----- Mobile Search (toggles) ----- */
.mobile-search-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  width: 100%;
}
.mobile-search-container.active {
  max-height: 80px;
  padding: 0.75rem 1rem;
}
.mobile-search-form {
  display: flex;
  width: 100%;
  gap: 0.5rem;
}
.mobile-search-input {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 2rem;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}
.mobile-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}
.mobile-search-button {
  background: var(--primary);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-search-button:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

/* ===== MAIN AREA – no side spaces ===== */
.main-content {
  display: block;
  width: 100%;
}
.main-area {
  width: 100%;
  padding: 0;
}

/* ----- Flash messages (edge‑to‑edge) ----- */
.alert-message {
  background: var(--success);
  color: white;
  padding: 1rem;
  margin: 0 0 1rem 0;            /* no side margins */
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

/* ----- Hero Banner (edge‑to‑edge) ----- */
.hero-banner {
  background: linear-gradient(145deg, var(--primary), var(--secondary));
  color: white;
  padding: 2.5rem 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  width: 100%;
}
.hero-banner h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.hero-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}
.hero-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  border-radius: 3rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: 2px solid transparent;
}
.hero-btn.primary {
  background: var(--white);
  color: var(--primary);
}
.hero-btn.primary:hover {
  background: transparent;
  color: white;
  border-color: white;
  transform: translateY(-3px);
}
.hero-btn.secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.hero-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
}

/* ----- Horizontal scroll categories (mobile) – full width ----- */
.categories-scroll-section {
  padding: 1rem 0 1.5rem;
  width: 100%;
  overflow-x: hidden;
}
.categories-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 1rem 1rem;          /* inner padding */
}
.categories-scroll::-webkit-scrollbar { display: none; }

.category-item {
  flex: 0 0 auto;
  width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--gray-800);
  gap: 0.5rem;
}
.category-icon {
  width: 70px;
  height: 70px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-300);
  overflow: hidden;
}
.category-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.category-icon i {
  font-size: 1.8rem;
  color: var(--primary);
}
.category-name {
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ----- How It Works (cards) – full width, inner padding ----- */
.how-it-works {
  padding: 1.5rem 1rem;
  background: var(--white);
  border-radius: 2rem 2rem 0 0;
  margin-top: 0.5rem;
}
.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  color: var(--dark);
}
.section-subtitle {
  color: var(--gray-600);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.step-card {
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: 1.5rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-300);
  transition: var(--transition);
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.step-number {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gray-300);
}
.step-icon {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}
.step-card h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.step-card p {
  color: var(--gray-600);
}

/* ----- ITEMS GRID – two columns on mobile, full width, inner padding ----- */
.items-section {
  padding: 1.5rem 1rem;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}
.view-all {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: var(--transition);
}
.view-all:hover {
  gap: 0.5rem;
  color: var(--primary-dark);
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  width: 100%;
}

.item-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-300);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.item-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.verified-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.6rem;
  border-radius: 2rem;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  z-index: 5;
}

.item-media-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--gray-200);
  overflow: hidden;
}
.item-image,
.item-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.item-card:hover .item-image,
.item-card:hover .item-video {
  transform: scale(1.05);
}
.video-poster {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.2);
  color: white;
  font-size: 2.5rem;
  pointer-events: none;
}
.item-info {
  padding: 0.75rem;
  flex: 1;
}
.item-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.price-badge {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  margin: 0.25rem 0;
}
.shop-info {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-top: 0.25rem;
}
.shop-info i { color: var(--primary); }

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  background: var(--white);
  border-radius: 2rem;
}
.empty-icon {
  font-size: 3rem;
  color: var(--gray-300);
  margin-bottom: 1rem;
}
.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.empty-state p {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}

/* ----- Entrepreneur Advantage (cards) – full width, inner padding ----- */
.entrepreneur-advantage {
  padding: 2rem 1rem;
  background: var(--white);
}
.advantage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}
.advantage-card {
  background: var(--bg-light);
  border-radius: 1.5rem;
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-300);
  transition: var(--transition);
}
.advantage-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.advantage-icon {
  font-size: 2rem;
  color: var(--primary);
  flex-shrink: 0;
}
.advantage-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.advantage-list {
  list-style: none;
  margin-top: 0.75rem;
}
.advantage-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 0.4rem;
}
.advantage-list i {
  color: var(--success);
  font-size: 0.8rem;
}

.entrepreneur-cta {
  background: linear-gradient(145deg, var(--primary), var(--secondary));
  color: white;
  padding: 2rem 1.5rem;
  border-radius: 2rem;
  text-align: center;
  margin-top: 2rem;
}
.entrepreneur-cta h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}
.entrepreneur-cta .button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}
.entrepreneur-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 3rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: 2px solid transparent;
}
.entrepreneur-button:not(.secondary) {
  background: var(--white);
  color: var(--primary);
}
.entrepreneur-button:not(.secondary):hover {
  background: transparent;
  color: white;
  border-color: white;
  transform: translateY(-3px);
}
.entrepreneur-button.secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.entrepreneur-button.secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
}

/* ----- Recent Activity examples – full width, inner padding ----- */
.example-posts {
  padding: 2rem 1rem;
}
.examples-grid {
  display: grid;
  gap: 1.5rem;
}
.example-card {
  background: var(--white);
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-300);
  position: relative;
  transition: var(--transition);
}
.example-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.request-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: var(--dark);
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.request-badge i { font-size: 0.9rem; }
.example-card h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.example-card p {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 1rem;
}
.tag {
  background: var(--gray-100);
  color: var(--gray-800);
  padding: 0.3rem 0.8rem;
  border-radius: 2rem;
  font-size: 0.7rem;
  font-weight: 500;
  border: 1px solid var(--gray-300);
}
.tag.high-budget {
  background: var(--success);
  color: white;
  border: none;
}
.respond-btn {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.8rem;
  border-radius: 3rem;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}
.respond-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -8px var(--primary);
}

/* ----- Footer (edge‑to‑edge) ----- */
.marketplace-footer {
  background: var(--dark);
  color: white;
  padding: 2rem 1.5rem 1.5rem;
  margin-top: 2rem;
  width: 100%;
}
.footer-logo {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.5rem;
}
.footer-tagline {
  color: var(--gray-400);
  margin-bottom: 2rem;
  font-size: 1rem;
}
.footer-sections {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 1rem;
  margin-bottom: 2rem;
}
.footer-section h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1rem;
  letter-spacing: 0.5px;
}
.footer-links {
  list-style: none;
}
.footer-link {
  color: var(--gray-300);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 2;
  transition: var(--transition);
  display: inline-block;
}
.footer-link:hover {
  color: white;
  transform: translateX(4px);
}
.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  text-align: center;
  color: var(--gray-400);
  font-size: 0.8rem;
}
.footer-legal-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-legal-links a {
  color: var(--gray-400);
  text-decoration: none;
  font-size: 0.8rem;
}
.footer-legal-links a:hover {
  color: white;
}

/* ===== TABLET & DESKTOP UPGRADES ===== */
@media (min-width: 768px) {
  .mobile-header,
  .mobile-search-container {
    display: none;
  }
  .top-nav,
  .marketplace-header,
  .sidebar {
    display: block;
  }

  .top-nav {
    background: var(--dark);
    color: white;
    padding: 0.4rem 2rem;
    font-size: 0.9rem;
  }
  .top-nav-content {
    display: flex;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
  }
  .top-nav-left a,
  .top-nav-right a {
    color: var(--gray-300);
    text-decoration: none;
    margin-right: 1.5rem;
    transition: var(--transition);
  }
  .top-nav-left a:hover,
  .top-nav-right a:hover {
    color: white;
  }

  .marketplace-header {
    background: var(--white);
    padding: 1rem 2rem;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--gray-300);
  }
  .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    gap: 2rem;
  }
  .logo {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
  }
  .search-form {
    flex: 1;
    max-width: 600px;
  }
  .search-wrapper {
    display: flex;
    border: 1px solid var(--gray-300);
    border-radius: 3rem;
    overflow: hidden;
    background: var(--white);
  }
  .search-input {
    flex: 1;
    padding: 0.9rem 1.2rem;
    border: none;
    outline: none;
    font-size: 1rem;
  }
  .search-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.9rem 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
  }
  .search-button:hover {
    background: var(--primary-dark);
  }

  .user-actions {
    display: flex;
    gap: 1.5rem;
  }
  .user-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--gray-800);
    font-weight: 500;
    transition: var(--transition);
  }
  .user-action:hover {
    color: var(--primary);
  }

  /* Main layout with sidebar */
  .main-content {
    display: flex;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    gap: 2rem;
  }
  .sidebar {
    flex: 0 0 240px;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    height: fit-content;
    border: 1px solid var(--gray-300);
    box-shadow: var(--shadow-sm);
  }
  .sidebar-title {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark);
  }
  .category-list {
    list-style: none;
  }
  .category-list li {
    margin-bottom: 0.6rem;
  }
  .category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    color: var(--gray-700);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid var(--gray-200);
  }
  .category-list a:hover {
    color: var(--primary);
    padding-left: 5px;
  }

  .main-area {
    flex: 1;
    min-width: 0;
  }

  /* Adjust grid for tablets */
  .items-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  .steps-container {
    flex-direction: row;
    gap: 2rem;
  }
  .step-card {
    flex: 1;
  }
  .advantage-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .examples-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-sections {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1200px) {
  .items-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== UTILITIES ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}