/* Shared header auth + light status styles — keep lean */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 7px;
  object-fit: cover;
  display: block;
}

.brand-text-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  line-height: 1.15;
  min-width: 0;
}

@media (max-width: 480px) {
  .brand {
    gap: 10px;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 6px;
  }
}

.lucy-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.header-actions {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.header-actions:not([data-auth-ready="true"]) {
  visibility: hidden;
}

.card-grid[data-listings-category] .listings-loading,
.card-grid[data-listings-category] .listings-empty,
.card-grid[data-listings-category] .listings-error,
.card-grid[data-listings-category] .listings-filter-empty {
  grid-column: 1 / -1;
  padding: 24px 0;
  color: #6b7280;
  font-size: 0.9375rem;
}

.card-grid[data-listings-category] .listings-error {
  color: #b91c1c;
}

.lucy-header-btn--ghost {
  background: #fff;
  border-color: #e5e7eb;
  color: #1a1a1a;
}

.lucy-header-btn--ghost:hover {
  background: #f9fafb;
}

.lucy-header-btn--primary {
  background: rgb(210, 4, 45);
  border-color: rgb(210, 4, 45);
  color: #fff;
}

.lucy-header-btn--primary:hover {
  background: rgb(176, 3, 38);
  border-color: rgb(176, 3, 38);
}

.lucy-header-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(210, 4, 45, 0.12);
}

.header-account {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 10px 7px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  min-width: 0;
  max-width: 100%;
}

.header-account--pending {
  border-color: #fcd34d;
  background: #fffbeb;
}

.header-user--email {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #92400e;
}

.header-user-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.header-user-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
  line-height: 1.1;
}

.header-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #111827;
}

.header-user-link {
  text-decoration: none;
  color: inherit;
}

.header-user-link:hover {
  color: rgb(210, 4, 45);
}

.btn-logout {
  flex-shrink: 0;
}

#lucyLogoutBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #1a1a1a;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

#lucyLogoutBtn:hover {
  background: #f9fafb;
}

#lucyLogoutBtn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.verified--unm {
  color: #16a34a;
}

.verified--gold {
  color: #ca8a04;
}

.header-badge {
  flex-shrink: 0;
}

@media (max-width: 760px) {
  .header-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .header-account {
    width: 100%;
    justify-content: space-between;
    border-radius: 14px;
  }

  .header-user {
    max-width: 100%;
  }
}

.auth-success {
  font-size: 0.8125rem;
  color: #065f46;
  margin-bottom: 12px;
  display: none;
}

.post-error {
  font-size: 0.875rem;
  color: #b91c1c;
  margin-bottom: 16px;
  display: none;
  padding: 12px 14px;
  background: #fef2f2;
  border-radius: 8px;
  border: 1px solid #fecaca;
}

.turnstile-wrap {
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
}

.turnstile-label {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 10px;
  color: #1a1a1a;
}

.turnstile-hint {
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
}

#turnstileWidget {
  min-height: 65px;
}

#turnstileWidget iframe {
  max-width: 100%;
}

/* Hide post form until auth resolves — no flash */
.form-shell.is-auth-pending,
.form-shell[data-auth-pending="true"] {
  display: none !important;
}

#authGate {
  display: none;
  max-width: 560px;
  margin: 40px auto;
  padding: 8px 0;
}

#authGate.is-visible,
#authGate[data-visible="true"] {
  display: block;
}

#authGate .page-heading {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 800;
}

#authGate .page-sub {
  margin: 0 0 20px;
  color: #6b7280;
  font-size: 0.9375rem;
  line-height: 1.5;
}

#authGate .lucy-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#authGate .lucy-gate-btn,
.lucy-state-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 18px;
  border-radius: 8px;
  background: rgb(210, 4, 45);
  border: 1px solid rgb(210, 4, 45);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

#authGate .lucy-gate-btn:hover,
.lucy-state-cta:hover {
  background: rgb(176, 3, 38);
  border-color: rgb(176, 3, 38);
  color: #fff;
}

#authGate .lucy-gate-btn--ghost {
  background: #fff;
  border-color: #e5e7eb;
  color: #1a1a1a;
}

#authGate .lucy-gate-btn--ghost:hover {
  background: #f9fafb;
  color: #1a1a1a;
}

/* Category nav: horizontal scroll on small screens */
.site-nav .wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.site-nav ul {
  flex-wrap: nowrap !important;
  width: max-content;
  min-width: 100%;
}

@media (min-width: 900px) {
  .site-nav ul {
    flex-wrap: wrap !important;
    width: auto;
    min-width: 0;
  }

  .site-nav .wrap {
    overflow: visible;
  }
}

/* Clean spacing after subtitle removal */
.page-intro {
  margin-bottom: 28px !important;
}

.page-intro .page-title {
  margin-bottom: 0 !important;
}

.listing-layout.is-loading .listing-actions,
.listing-layout.is-loading .btn-message {
  pointer-events: none;
  opacity: 0.5;
}

/* Shared card detail — works across homepage + categories */
.card-body {
  padding: 14px 14px 16px;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.card-title {
  flex: 1;
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.card-desc {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #4b5563;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.card-price {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1d7a3a;
  line-height: 1.2;
}

.card-meta {
  margin: 0;
  font-size: 0.75rem;
  color: #6b7280;
  white-space: nowrap;
}

.card-grid {
  gap: 22px;
}

