/**
 * User pages (Markplek, Boodskappe, Product detail, Business detail, Listing create)
 * Mobile-first premium styling to match dashboard-user. Design system: 14px padding, 16px rhythm.
 */
@media (max-width: 768px) {

  body.user-page .app-main {
    padding: 14px 14px 28px;
  }

  /* ----- Dashboard intro (marketplace, etc.) ----- */
  body.user-page .dashboard-intro {
    margin-bottom: 16px;
  }

  body.user-page .dashboard-intro h1 {
    font-size: 1.2rem;
    margin-bottom: 6px;
  }

  body.user-page .dashboard-intro p {
    font-size: 0.8125rem;
    line-height: 1.45;
  }

  body.user-page .feedback {
    font-size: 0.8125rem;
    padding: 10px 12px;
    border-radius: 0.5rem;
    margin-top: 12px;
  }

  /* ----- Marketplace ----- */
  body.user-page .market-shell {
    gap: 16px;
  }

  body.user-page .market-filter {
    padding: 14px;
    border-radius: 0.75rem;
  }

  body.user-page .market-filter h3 {
    font-size: 0.9375rem;
    margin: 0 0 10px 0;
  }

  body.user-page .market-option {
    padding: 10px 12px;
    font-size: 0.8125rem;
    border-radius: 0.5rem;
  }

  body.user-page .market-feed {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  body.user-page .feed-card {
    border-radius: 0.6rem;
    overflow: hidden;
    border: 1px solid var(--border-default);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }

  body.user-page .feed-card img {
    height: 100px;
    object-fit: cover;
  }

  body.user-page .feed-copy {
    padding: 10px;
    gap: 4px;
  }

  body.user-page .feed-copy strong {
    font-size: 0.8125rem;
  }

  body.user-page .feed-price {
    font-size: 0.9375rem;
  }

  body.user-page .row-meta {
    font-size: 0.7rem;
  }

  /* Intro actions: search + buttons ----- */
  body.user-page .dashboard-intro-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
  }

  body.user-page .dashboard-intro-search {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 0;
  }

  body.user-page .dashboard-intro-search input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-default);
  }

  body.user-page .dashboard-intro-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  body.user-page .dashboard-intro .btn {
    padding: 8px 14px;
    font-size: 0.8125rem;
    border-radius: 0.5rem;
  }

  /* ----- Product detail ----- */
  body.user-page .detail-grid {
    gap: 16px;
  }

  body.user-page .detail-panel {
    padding: 14px;
    border-radius: 0.75rem;
    border: 1px solid var(--border-default);
  }

  body.user-page .detail-hero-img {
    border-radius: 0.6rem;
  }

  body.user-page .detail-panel h1 {
    font-size: 1.125rem;
    margin-top: 12px;
  }

  body.user-page .detail-panel h2,
  body.user-page .detail-panel h3 {
    font-size: 0.9375rem;
  }

  body.user-page .detail-panel .feed-price {
    font-size: 1.25rem;
  }

  body.user-page .detail-panel .btn {
    padding: 10px 14px;
    font-size: 0.875rem;
    border-radius: 0.5rem;
  }

  /* ----- Business detail ----- */
  body.user-page.business-detail-page .app-main {
    padding: 0 0 28px;
  }

  body.user-page .business-detail-shell {
    margin: 14px;
    border-radius: 0.75rem;
    overflow: hidden;
  }

  body.user-page .business-hero {
    padding: 1.25rem 14px 1rem;
  }

  body.user-page .business-hero-title {
    font-size: 1.25rem;
  }

  body.user-page .business-hero-meta {
    font-size: 0.8125rem;
  }

  body.user-page .business-hero-rating {
    font-size: 0.875rem;
    margin-top: 10px;
  }

  body.user-page .business-hero-tabs {
    margin-top: 12px;
    gap: 8px;
  }

  body.user-page .business-hero-tab {
    padding: 8px 12px;
    font-size: 0.8125rem;
    border-radius: 0.5rem;
  }

  /* ----- Listing create ----- */
  body.user-page .detail-panel .auth-form {
    margin-top: 14px;
    display: grid;
    gap: 12px;
  }

  body.user-page .detail-panel .auth-form label {
    font-size: 0.8125rem;
    font-weight: 600;
  }

  body.user-page .detail-panel .auth-form input,
  body.user-page .detail-panel .auth-form select,
  body.user-page .detail-panel .auth-form textarea {
    padding: 10px 12px;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-default);
  }

  body.user-page .detail-panel .auth-form .btn {
    padding: 10px 14px;
    border-radius: 0.5rem;
  }

  body.user-page .detail-panel h1 {
    font-size: 1.125rem;
  }

  /* ----- Businesses directory page ----- */
  body.user-page .businesses-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
  }

  body.user-page .businesses-filters input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    font-size: 0.875rem;
    border: 1px solid var(--border-default);
    border-radius: 0.5rem;
  }

  body.user-page .businesses-filters select {
    padding: 10px 12px;
    font-size: 0.875rem;
    border: 1px solid var(--border-default);
    border-radius: 0.5rem;
    min-width: 140px;
  }

  body.user-page .businesses-directory-list {
    margin-top: 16px;
  }

  body.user-page .businesses-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  body.user-page .businesses-directory-card {
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border-default);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }

  body.user-page .business-card-unpaid {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border-default);
    border-radius: 0.6rem;
    background: var(--bg-card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }

  body.user-page .business-card-unpaid-image {
    width: 80px;
    height: 80px;
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.user-page .business-card-unpaid-image img {
    width: 48px;
    height: 48px;
    object-fit: contain;
  }

  body.user-page .business-card-unpaid-body h3 {
    font-size: 0.9375rem;
    margin: 0 0 6px 0;
  }

  body.user-page .business-card-unpaid-email,
  body.user-page .business-card-unpaid-address {
    font-size: 0.8125rem;
    margin: 0;
    color: var(--text-muted);
  }

  body.user-page .business-card-unpaid-email a {
    color: var(--brand-teal-700);
    text-decoration: none;
  }

  /* ----- Specials page ----- */
  body.user-page .specials-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
  }

  body.user-page .specials-filter-group {
    flex: 1 1 140px;
    min-width: 0;
  }

  body.user-page .specials-filters select {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    font-size: 0.8125rem;
  }

  body.user-page .specials-filter-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  body.user-page .specials-page-section {
    margin-top: 14px;
  }

  body.user-page .specials-empty {
    font-size: 0.875rem;
    padding: 1.5rem 14px;
  }

  /* ----- Werkbord (jobs) page ----- */
  body.user-page .jobs-page-intro .btn {
    margin-top: 10px;
  }

  body.user-page .jobs-section-seekers {
    margin-top: 24px;
  }

  body.user-page .jobs-section-vacancies h2,
  body.user-page .jobs-section-seekers h2 {
    font-size: 1.1rem;
    margin: 0 0 4px 0;
  }

  body.user-page .modal-form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  /* ----- Job board ----- */
  body.user-page .jobs-list {
    margin-top: 16px;
  }

  body.user-page .jobs-grid {
    display: grid;
    gap: 12px;
  }

  body.user-page .job-card {
    display: block;
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    border: 1px solid var(--border-default);
    border-radius: 0.6rem;
    background: var(--bg-card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: transform 0.15s ease;
  }

  body.user-page .job-card:active {
    transform: scale(0.99);
  }

  body.user-page .job-card-title {
    font-size: 0.9375rem;
    margin: 0 0 4px 0;
    font-weight: 700;
  }

  body.user-page .job-card-business {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0 0 8px 0;
  }

  body.user-page .job-card-excerpt {
    font-size: 0.8125rem;
    margin: 0;
    line-height: 1.4;
  }

  body.user-page .job-detail-modal {
    max-width: 480px;
    width: 92%;
  }

  body.user-page .job-modal-description {
    margin: 1rem 0;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
  }

  body.user-page .job-modal-contact {
    margin: 1rem 0 0 0;
  }

  body.user-page .job-modal-contact a {
    color: var(--brand-teal-700);
    font-weight: 600;
  }

  /* ----- Events page ----- */
  body.user-page .events-list {
    margin-top: 16px;
  }

  body.user-page .events-section-title {
    font-size: 1rem;
    margin: 1rem 0 0.5rem 0;
    color: var(--text-muted);
  }

  body.user-page .events-section-title:first-child {
    margin-top: 0;
  }

  body.user-page .events-grid {
    display: grid;
    gap: 12px;
  }

  body.user-page .event-card {
    border: 1px solid var(--border-default);
    border-radius: 0.6rem;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }

  body.user-page .event-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    max-height: 320px;
    object-fit: cover;
    display: block;
  }

  body.user-page .event-card-body {
    padding: 12px 14px;
  }

  body.user-page .event-card-title {
    font-size: 0.9375rem;
    margin: 0 0 4px 0;
    font-weight: 700;
  }

  body.user-page .event-card-meta,
  body.user-page .event-card-venue {
    font-size: 0.8125rem;
    margin: 0;
    color: var(--text-muted);
  }

  body.user-page .event-card-past .event-card-body {
    opacity: 0.85;
  }

  /* ----- Footer ----- */
  body.user-page .app-footer {
    padding: 20px 14px 24px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  body.user-page .footer-logo {
    width: 100px;
    margin-bottom: 12px;
  }

  body.user-page .footer-text {
    font-size: 0.8125rem;
  }
}

/* ----- Product detail: one big image + 4 small thumbs (image swapper) ----- */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-gallery-main {
  width: 100%;
  border-radius: var(--radius-md, 0.5rem);
  overflow: hidden;
  background: var(--bg-input);
  aspect-ratio: 4/3;
}

.product-gallery-main .detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
}

.product-gallery-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid var(--border-default);
  border-radius: 0.4rem;
  overflow: hidden;
  background: var(--bg-input);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.product-gallery-thumb:hover {
  border-color: var(--brand-orange-400);
}

.product-gallery-thumb.is-active {
  border-color: var(--brand-orange-500);
  box-shadow: 0 0 0 2px var(--brand-orange-500);
}

.product-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mark-sold-buyers {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
  max-height: 200px;
  overflow-y: auto;
}

.mark-sold-buyer-btn {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border: 1px solid var(--border-default);
  border-radius: 0.5rem;
  background: var(--bg-card);
  cursor: pointer;
  font-size: 0.9375rem;
}

.mark-sold-buyer-btn.is-active {
  border-color: var(--brand-orange-500);
  background: color-mix(in srgb, var(--brand-orange-500) 12%, transparent);
}

.rate-stars {
  display: flex;
  gap: 0.25rem;
  margin: 0.25rem 0;
}

.rate-star {
  padding: 0.25rem 0.1rem;
  font-size: 1.75rem;
  color: var(--border-default);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.rate-star.is-filled,
.rate-star:hover {
  color: var(--brand-orange-500);
}
