/**
 * @file marketplace.css
 * @description Marketplace listing page styles - hero, search, category filters,
 *   card grid, badges, pagination. Uses purple accent (--primary-color: #05A34A)
 *   per brand guide for "category differentiation".
 * @page marketplace.html
 */
    :root {
      --primary-color: #05A34A;
      --primary-dark: #048a3e;
      --secondary-color: #66D1D1;
      --text-dark: #1f2937;
      --text-light: #6b7280;
      --bg-light: #f8f9fa;
    }

    body {
      font-family: 'Inter', sans-serif;
      color: var(--text-dark);
    }

    .marketplace-hero {
      background: linear-gradient(135deg, #05A34A 0%, #66D1D1 100%);
      padding: 120px 0 80px;
      color: white;
    }

    .marketplace-search {
      max-width: 600px;
      margin: 2rem auto 0;
      position: relative;
    }

    .marketplace-search input {
      height: 56px;
      font-size: 1.1rem;
      border-radius: 28px;
      padding-left: 3rem;
      border: none;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
      width: 100%;
    }

    .marketplace-search i,
    .marketplace-search svg {
      position: absolute;
      left: 1.2rem;
      top: 50%;
      -webkit-transform: translateY(-50%);
      -moz-transform: translateY(-50%);
      -ms-transform: translateY(-50%);
      -o-transform: translateY(-50%);
      transform: translateY(-50%);
      color: var(--text-light);
      pointer-events: none;
      z-index: 1;
    }

    .category-filters {
      background: white;
      padding: 2rem 0;
      box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

    .category-btn {
      padding: 0.75rem 1.5rem;
      border-radius: 24px;
      border: 2px solid #e5e7eb;
      background: white;
      color: var(--text-dark);
      font-weight: 500;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      cursor: pointer;
      margin: 0.5rem;
      position: relative;
      overflow: hidden;
      -webkit-transform: translateZ(0);
      -moz-transform: translateZ(0);
      -ms-transform: translateZ(0);
      transform: translateZ(0);
    }

    .category-btn:hover {
      border-color: var(--primary-color);
      color: var(--primary-color);
      background: rgba(37, 99, 235, 0.05);
      -webkit-transform: translateY(-2px) scale(1.02);
      -moz-transform: translateY(-2px) scale(1.02);
      -ms-transform: translateY(-2px) scale(1.02);
      transform: translateY(-2px) scale(1.02);
      -webkit-box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
      -moz-box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
      box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    }

    .category-btn:active {
      -webkit-transform: translateY(0) scale(0.98);
      -moz-transform: translateY(0) scale(0.98);
      -ms-transform: translateY(0) scale(0.98);
      transform: translateY(0) scale(0.98);
    }

    .category-btn.active {
      background: var(--primary-color);
      color: white;
      border-color: var(--primary-color);
      -webkit-box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
      -moz-box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
      box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    }

    .category-btn.active:hover {
      -webkit-transform: translateY(-2px) scale(1.02);
      -moz-transform: translateY(-2px) scale(1.02);
      -ms-transform: translateY(-2px) scale(1.02);
      transform: translateY(-2px) scale(1.02);
    }

    .marketplace-card {
      background: white;
      border-radius: 16px;
      overflow: hidden;
      transition: all 0.3s ease;
      border: 1px solid #e5e7eb;
      height: 100%;
      display: flex;
      display: -webkit-flex;
      display: -moz-flex;
      display: -ms-flexbox;
      flex-direction: column;
      -webkit-flex-direction: column;
      -moz-flex-direction: column;
      -ms-flex-direction: column;
    }

    .marketplace-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 12px 24px rgba(0,0,0,0.1);
      border-color: var(--primary-color);
    }

    .marketplace-card-image {
      height: 180px;
      background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      overflow: hidden;
    }

    .marketplace-card-image i {
      font-size: 3rem;
      color: var(--primary-color);
    }

    .marketplace-card-image img {
      width: 100% !important;
      height: 100% !important;
      max-width: none !important;
      max-height: none !important;
      object-fit: cover !important;
      object-position: center !important;
    }

    .marketplace-card-image img[src*="logo-dark.png"] {
      width: auto !important;
      height: auto !important;
      max-width: 200px !important;
      max-height: 200px !important;
      object-fit: contain !important;
    }

    /* Enhanced hero image tiles for Strongly apps */
    .marketplace-card-image.hero-tile {
      background-size: cover;
      background-position: center;
      position: relative;
    }

    .marketplace-card-image.hero-tile::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
      z-index: 1;
    }

    .marketplace-card-image.hero-tile .hero-tile-title {
      position: relative;
      z-index: 2;
      font-family: 'Inter', sans-serif;
      font-size: 1.75rem;
      font-weight: 800;
      letter-spacing: -1px;
      text-transform: uppercase;
      text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }

    .marketplace-card-image.hero-tile .marketplace-card-category {
      z-index: 2;
    }

    .marketplace-card-category {
      position: absolute;
      top: 1rem;
      right: 1rem;
      background: rgba(255, 255, 255, 0.95);
      padding: 0.25rem 0.75rem;
      border-radius: 12px;
      font-size: 0.75rem;
      font-weight: 600;
      color: var(--primary-color);
    }

    .marketplace-card-body {
      padding: 1.5rem;
      display: flex;
      display: -webkit-flex;
      display: -moz-flex;
      display: -ms-flexbox;
      flex-direction: column;
      -webkit-flex-direction: column;
      -moz-flex-direction: column;
      -ms-flex-direction: column;
      flex: 1;
      -webkit-flex: 1;
      -moz-flex: 1;
      -ms-flex: 1;
    }

    .marketplace-card-title {
      font-size: 1.25rem;
      font-weight: 600;
      margin-bottom: 0.5rem;
      color: var(--text-dark);
      min-height: 3rem;
      display: flex;
      display: -webkit-flex;
      display: -moz-flex;
      display: -ms-flexbox;
      align-items: center;
      -webkit-align-items: center;
      -moz-align-items: center;
      -ms-align-items: center;
    }

    .marketplace-card-description {
      color: var(--text-light);
      font-size: 0.95rem;
      margin-bottom: 1rem;
      line-height: 1.5;
      min-height: 4.5rem;
      flex-grow: 0;
      -webkit-flex-grow: 0;
      -moz-flex-grow: 0;
      -ms-flex-grow: 0;
    }

    .marketplace-card-meta {
      display: flex;
      align-items: center;
      gap: 1rem;
      font-size: 0.85rem;
      color: var(--text-light);
      margin-bottom: 1rem;
      min-height: 24px;
    }

    .marketplace-card-meta i {
      width: 16px;
      height: 16px;
    }

    .marketplace-card-footer {
      display: flex;
      display: -webkit-flex;
      display: -moz-flex;
      display: -ms-flexbox;
      justify-content: space-between;
      -webkit-justify-content: space-between;
      -moz-justify-content: space-between;
      -ms-justify-content: space-between;
      align-items: center;
      -webkit-align-items: center;
      -moz-align-items: center;
      -ms-align-items: center;
      padding-top: 1rem;
      border-top: 1px solid #e5e7eb;
      margin-top: auto;
    }

    .marketplace-badge {
      display: inline-block;
      padding: 0.25rem 0.75rem;
      border-radius: 12px;
      font-size: 0.75rem;
      font-weight: 600;
    }

    .badge-featured {
      background: rgba(37, 99, 235, 0.1);
      color: var(--primary-color);
    }

    .badge-popular {
      background: rgba(124, 58, 237, 0.1);
      color: var(--secondary-color);
    }

    .badge-new {
      background: rgba(16, 185, 129, 0.1);
      color: #10b981;
    }

    /* Empty State Styles */
    .empty-state {
      display: none;
      text-align: center;
      padding: 4rem 2rem;
    }

    .empty-state-icon {
      width: 80px;
      height: 80px;
      background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 1.5rem;
      color: var(--primary-color);
    }

    .empty-state h3 {
      font-size: 1.5rem;
      font-weight: 600;
      margin-bottom: 1rem;
      color: var(--text-dark);
    }

    .empty-state p {
      color: var(--text-light);
      font-size: 1rem;
      margin-bottom: 2rem;
      max-width: 500px;
      margin-left: auto;
      margin-right: auto;
    }

    /* Pagination Styles */
    .pagination {
      display: flex;
      display: -webkit-flex;
      display: -moz-flex;
      display: -ms-flexbox;
      flex-wrap: wrap;
      -webkit-flex-wrap: wrap;
      -moz-flex-wrap: wrap;
      -ms-flex-wrap: wrap;
      gap: 0.5rem;
      list-style: none;
      padding-left: 0;
      margin: 0;
    }

    .pagination .page-item {
      margin: 0;
      list-style: none;
    }

    .pagination .page-link {
      display: block;
      border: 2px solid #e5e7eb;
      border-radius: 8px;
      color: var(--text-dark);
      font-weight: 500;
      padding: 0.5rem 0.75rem;
      min-width: 40px;
      text-align: center;
      text-decoration: none;
      transition: all 0.3s ease;
      -webkit-transition: all 0.3s ease;
      -moz-transition: all 0.3s ease;
      -o-transition: all 0.3s ease;
      background-color: white;
    }

    .pagination .page-link:hover {
      border-color: var(--primary-color);
      color: var(--primary-color);
      background-color: rgba(37, 99, 235, 0.05);
    }

    .pagination .page-item.active .page-link {
      background-color: var(--primary-color);
      border-color: var(--primary-color);
      color: white;
      z-index: 1;
    }

    .pagination .page-item.disabled .page-link {
      color: var(--text-light);
      pointer-events: none;
      opacity: 0.5;
      border-color: #e5e7eb;
      background-color: transparent;
    }

    .pagination .page-link:focus {
      box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
      z-index: 2;
    }

    @media (max-width: 767.98px) {
      .marketplace-hero {
        padding: 100px 0 60px;
      }

      .marketplace-card-image {
        height: 140px;
      }

      .pagination .page-link {
        padding: 0.4rem 0.6rem;
        min-width: 36px;
        font-size: 0.9rem;
      }
    }
