/* ═══════════════════════════════════════════════════════════
   AiDOOS Product Marketplace – Landing Page Styles
   ═══════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────── */
.pm-page {
  background: #f8f8f4;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.pm-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Hero ─────────────────────────────────────────────────── */
.pm-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}

.pm-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(61,89,171,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.pm-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.pm-hero-title {
  font-size: 44px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 16px;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.pm-hero-accent {
  background: linear-gradient(135deg, #f0c040 0%, #e8a020 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pm-hero-sub {
  font-size: 17px;
  color: #b8c4d8;
  line-height: 1.6;
  margin: 0 0 32px;
}

.pm-hero-sub strong {
  color: #ffffff;
}

/* ── Hero Search ──────────────────────────────────────────── */
.pm-hero-search-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto 36px;
}

.pm-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.pm-hero-search {
  width: 100%;
  padding: 16px 20px 16px 50px;
  font-size: 16px;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  backdrop-filter: blur(10px);
}

.pm-hero-search::placeholder {
  color: #8896aa;
}

.pm-hero-search:focus {
  border-color: #f0c040;
  background: rgba(255,255,255,0.12);
}

/* ── Hero Stats ───────────────────────────────────────────── */
.pm-hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.pm-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.pm-stat-num {
  font-size: 20px;
  font-weight: 700;
  color: #f0c040;
}

.pm-stat-label {
  font-size: 12px;
  color: #8896aa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pm-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.12);
}

/* ── Category Pills ───────────────────────────────────────── */
.pm-categories-section {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 90;
}

.pm-categories-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  -ms-overflow-style: none;
}

.pm-categories-scroll::-webkit-scrollbar {
  height: 4px;
}

.pm-categories-scroll::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.pm-category-pill {
  flex-shrink: 0;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.pm-category-pill:hover {
  background: #e8ecf3;
  color: #1a1a2e;
}

.pm-category-pill.active {
  background: #3d59ab;
  color: #ffffff;
  border-color: #3d59ab;
}

/* ── Sections ─────────────────────────────────────────────── */
.pm-section {
  padding: 48px 0;
}

.pm-section-header {
  margin-bottom: 28px;
}

.pm-section-title {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 6px;
}

.pm-section-sub {
  font-size: 15px;
  color: #6b7280;
  margin: 0;
}

/* ── Product Grid ─────────────────────────────────────────── */
.pm-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pm-grid-featured {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1199px) {
  .pm-grid { grid-template-columns: repeat(3, 1fr); }
  .pm-grid-featured { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 899px) {
  .pm-grid { grid-template-columns: repeat(2, 1fr); }
  .pm-grid-featured { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 599px) {
  .pm-grid,
  .pm-grid-featured { grid-template-columns: 1fr; }
  .pm-hero-title { font-size: 30px; }
  .pm-hero { padding: 48px 0 40px; }
  .pm-hero-stats { gap: 16px; }
  .pm-stat-divider { display: none; }
}

/* ── Product Card ─────────────────────────────────────────── */
.pm-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  text-decoration: none !important;
  color: inherit !important;
  height: 100%;
}

.pm-card:hover {
  box-shadow: 0 8px 30px rgba(61,89,171,0.12);
  transform: translateY(-3px);
  text-decoration: none !important;
}

.pm-card-featured {
  border: 2px solid #e8d48c;
}

.pm-card-featured:hover {
  border-color: #d4a820;
}

/* Card Image */
.pm-card-img-wrap {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fb;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
  padding: 16px;
}

.pm-card-logo {
  max-width: 70%;
  max-height: 80%;
  object-fit: contain;
}

.pm-card-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #3d59ab 0%, #667eea 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 36px;
  text-transform: uppercase;
  border-radius: 16px;
}

/* Card Body */
.pm-card-body {
  flex: 1;
  padding: 14px 16px 8px;
}

.pm-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pm-card-badge {
  font-size: 11px;
  font-weight: 500;
  color: #3d59ab;
  background: #eef1f8;
  padding: 3px 10px;
  border-radius: 12px;
}

.pm-card-detailed-badge {
  font-size: 11px;
  font-weight: 600;
  color: #92700c;
  background: #fef9e7;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #f0dfa0;
}

.pm-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 6px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pm-card-desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Footer */
.pm-card-footer {
  padding: 0 16px 16px;
}

.pm-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #3d59ab;
  transition: gap 0.18s ease;
}

.pm-card:hover .pm-card-link {
  gap: 10px;
}

/* ── No Results ───────────────────────────────────────────── */
.pm-no-results {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

.pm-no-results h3 {
  font-size: 18px;
  color: #374151;
  margin: 16px 0 8px;
}

.pm-no-results p {
  font-size: 14px;
  margin: 0;
}

/* ── Bottom CTA ───────────────────────────────────────────── */
.pm-bottom-cta {
  padding: 0 0 48px;
}

.pm-bottom-cta-inner {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
  border-radius: 16px;
  padding: 48px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.pm-bottom-cta-text h2 {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px;
}

.pm-bottom-cta-text p {
  font-size: 15px;
  color: #b8c4d8;
  margin: 0;
  max-width: 480px;
}

.pm-bottom-cta-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .pm-bottom-cta-inner {
    flex-direction: column;
    text-align: center;
    padding: 36px 24px;
  }
  .pm-bottom-cta-actions {
    flex-direction: column;
    width: 100%;
  }
}

/* ── Buttons ──────────────────────────────────────────────── */
.pm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.pm-btn-gold {
  background: linear-gradient(135deg, #f0c040 0%, #d4a520 100%);
  color: #1a1a2e !important;
}

.pm-btn-gold:hover {
  background: linear-gradient(135deg, #f5d060 0%, #e0b530 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(240,192,64,0.3);
}

.pm-btn-outline {
  background: transparent;
  color: #ffffff !important;
  border: 1.5px solid rgba(255,255,255,0.3);
}

.pm-btn-outline:hover {
  border-color: #ffffff;
  background: rgba(255,255,255,0.08);
}

.pm-btn-outline-dark {
  background: transparent;
  color: #1a1a2e !important;
  border: 1.5px solid #d1d5db;
}

.pm-btn-outline-dark:hover {
  border-color: #3d59ab;
  color: #3d59ab !important;
  background: rgba(61,89,171,0.04);
}

/* ── List Your Product (secondary) ────────────────────────── */
.pm-list-product {
  padding: 0 0 48px;
}

.pm-list-product-inner {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.pm-list-product-inner h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 4px;
}

.pm-list-product-inner p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

@media (max-width: 599px) {
  .pm-list-product-inner {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }
}

/* ── Login Dialog (existing styles kept) ──────────────────── */
.loginDialog {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.login-dia-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 420px;
  width: 90%;
}

/* ── Pagination ───────────────────────────────────────────── */
.pm-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 40px;
  padding-bottom: 8px;
}
.pm-page-btn {
  padding: 7px 13px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.pm-page-btn:hover:not([disabled]) {
  background: #f3f4f6;
  border-color: #9ca3af;
}
.pm-page-btn.active {
  background: #1a1a2e;
  color: #fff;
  border-color: #1a1a2e;
}
.pm-page-btn[disabled] {
  opacity: 0.4;
  cursor: default;
}
.pm-page-ellipsis {
  padding: 0 4px;
  color: #9ca3af;
  font-size: 14px;
}
.pm-page-info {
  margin-left: 12px;
  font-size: 13px;
  color: #6b7280;
}
.pm-loading {
  text-align: center;
  padding: 60px 0;
  color: #9ca3af;
  font-size: 16px;
  grid-column: 1 / -1;
}
