/* =========================================================
   PartySpace UI Design System v1.3
   Airbnb-inspired marketplace style — coral theme (from
   partyspace-wireframe theme.css + App.tsx visual language)
   with Nunito
   ========================================================= */

:root {
  /* Backgrounds */
  --ps-bg: #ffffff;
  --ps-bg-soft: #f7f7f7;
  --ps-card: #ffffff;
  --ps-section-soft: #f7f7f7;

  /* Primary */
  --ps-primary: #ff385c;
  --ps-primary-dark: #e11d48;
  --ps-primary-light: #ffeef1;

  /* Brand gradients (wireframe signature CTA + soft banners) */
  --ps-gradient-brand: linear-gradient(to right, #ec4899, #fb923c);
  --ps-gradient-brand-hover: linear-gradient(to right, #db2777, #f97316);
  --ps-gradient-soft: linear-gradient(to right, #fdf2f8, #fff1f2);
  --ps-gradient-soft-warm: linear-gradient(to right, #fdf2f8, #fff7ed);

  /* Status / UI */
  --ps-location: #ff385c;
  --ps-rating: #f59e0b;
  --ps-success: #16a34a;
  --ps-success-light: #dcfce7;
  --ps-destructive: #c13515;

  /* Text */
  --ps-text-primary: #222222;
  --ps-text-secondary: #484848;
  --ps-text-muted: #717171;
  --ps-text-light: #b0b0b0; /* placeholders / decorative only — low contrast */

  /* Borders */
  --ps-border: #dddddd;
  --ps-border-soft: #ebebeb;

  /* Typography */
  --ps-font-family: Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Spacing */
  --ps-space-xs: 4px;
  --ps-space-sm: 8px;
  --ps-space-md: 12px;
  --ps-space-lg: 16px;
  --ps-space-xl: 24px;
  --ps-space-2xl: 32px;
  --ps-space-3xl: 48px;

  /* Radius */
  --ps-radius-sm: 8px;
  --ps-radius-md: 10px;
  --ps-radius-lg: 12px;
  --ps-radius-xl: 16px;
  --ps-radius-full: 999px;

  /* Shadows */
  --ps-shadow-card: 0 8px 24px rgba(17, 24, 39, 0.06);
  --ps-shadow-soft: 0 4px 14px rgba(17, 24, 39, 0.05);
  --ps-shadow-floating: 0 10px 30px rgba(17, 24, 39, 0.10);

  /* Motion */
  --ps-transition: 160ms ease;

  /* Layers */
  --ps-z-sticky: 10;
  --ps-z-nav: 20;

  /* Layout */
  --ps-screen-padding: 24px;
  --ps-bottom-nav-height: 86px;
}

/* Base */
body {
  margin: 0;
  background: var(--ps-bg);
  color: var(--ps-text-primary);
  font-family: var(--ps-font-family);
}

/* Screen */
.ps-screen {
  min-height: 100vh;
  background: var(--ps-bg);
  padding: var(--ps-screen-padding);
  box-sizing: border-box;
}

.ps-section {
  margin-bottom: var(--ps-space-xl);
}

.ps-section-soft {
  background: var(--ps-section-soft);
  border-radius: var(--ps-radius-xl);
  padding: var(--ps-space-lg);
}

/* Typography */
.ps-screen-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ps-text-primary);
  margin: 0 0 var(--ps-space-lg);
}

.ps-section-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ps-text-primary);
  margin: 0 0 var(--ps-space-md);
}

.ps-vendor-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ps-text-primary);
  margin: 0;
}

.ps-body-text {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ps-text-secondary);
}

.ps-meta-text {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ps-text-muted);
}

/* Price block: "Starts from / $1,200 / per event" */
.ps-price-block {
  text-align: right;
}

.ps-price-label,
.ps-price-unit {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ps-text-muted);
}

.ps-price-text {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ps-primary);
}

/* Buttons */
/* Buttons and form controls don't inherit font-family by default — force the
   brand typeface so CTAs render in Nunito, not the browser default (Arial). */
.ps-button-primary,
.ps-button-secondary,
.ps-button-dark,
.ps-button-gradient,
.ps-button-small,
.ps-chip {
  font-family: var(--ps-font-family);
}

.ps-button-primary {
  height: 56px;
  padding: 0 24px;
  border: none;
  border-radius: var(--ps-radius-lg);
  background: var(--ps-primary);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--ps-transition), transform var(--ps-transition);
}

.ps-button-primary:hover {
  background: var(--ps-primary-dark);
}

.ps-button-secondary {
  height: 56px;
  padding: 0 24px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-lg);
  background: var(--ps-bg);
  color: var(--ps-text-primary);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--ps-transition), transform var(--ps-transition);
}

.ps-button-secondary:hover {
  background: var(--ps-bg-soft);
}

/* Dark pill — wireframe "Sign In" style */
.ps-button-dark {
  height: 48px;
  padding: 0 22px;
  border: none;
  border-radius: var(--ps-radius-full);
  background: var(--ps-text-primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--ps-transition), transform var(--ps-transition);
}

.ps-button-dark:hover {
  background: #1f2937;
}

/* Gradient pill — wireframe "List your business" signature CTA */
.ps-button-gradient {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  padding: 0 22px;
  border: none;
  border-radius: var(--ps-radius-full);
  background: var(--ps-gradient-brand);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.25);
  transition: box-shadow var(--ps-transition), transform var(--ps-transition);
}

.ps-button-gradient:hover {
  background: var(--ps-gradient-brand-hover);
  box-shadow: 0 6px 18px rgba(236, 72, 153, 0.35);
}

.ps-button-small {
  height: 42px;
  padding: 0 18px;
  border: none;
  border-radius: var(--ps-radius-full);
  background: var(--ps-primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--ps-transition), transform var(--ps-transition);
}

.ps-button-small:hover {
  background: var(--ps-primary-dark);
}

.ps-button-primary:active,
.ps-button-secondary:active,
.ps-button-dark:active,
.ps-button-gradient:active,
.ps-button-small:active {
  transform: scale(0.98);
}

.ps-button-primary:disabled,
.ps-button-secondary:disabled,
.ps-button-dark:disabled,
.ps-button-gradient:disabled,
.ps-button-small:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ps-button-primary:focus-visible,
.ps-button-secondary:focus-visible,
.ps-button-dark:focus-visible,
.ps-button-gradient:focus-visible,
.ps-button-small:focus-visible,
.ps-chip:focus-visible,
.ps-fav-button:focus-visible,
.ps-search-bar:focus-visible {
  outline: 2px solid var(--ps-primary);
  outline-offset: 2px;
}

/* Chips */
.ps-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-full);
  background: var(--ps-bg);
  color: var(--ps-text-primary);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--ps-transition), border-color var(--ps-transition);
}

.ps-chip:hover {
  border-color: var(--ps-text-muted);
}

.ps-chip-selected {
  background: var(--ps-primary);
  color: #ffffff;
  border-color: var(--ps-primary);
  font-weight: 700;
}

/* Horizontally scrolling filter chip row */
.ps-chip-row {
  display: flex;
  gap: var(--ps-space-sm);
  overflow-x: auto;
  padding-bottom: var(--ps-space-xs);
  scrollbar-width: none;
}

.ps-chip-row::-webkit-scrollbar {
  display: none;
}

/* Cards */
.ps-card {
  background: var(--ps-card);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-lg);
  box-shadow: var(--ps-shadow-card);
  overflow: hidden;
}

.ps-card-content {
  padding: var(--ps-space-lg);
}

.ps-vendor-card {
  display: flex;
  gap: var(--ps-space-md);
  background: var(--ps-card);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-lg);
  box-shadow: var(--ps-shadow-card);
  overflow: hidden;
  padding: var(--ps-space-md);
}

/* Category tile: icon on soft tinted circle + label (wireframe All Categories style) */
.ps-category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ps-space-sm);
  padding: var(--ps-space-lg) var(--ps-space-sm);
  background: var(--ps-card);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-xl);
  font-size: 14px;
  font-weight: 700;
  color: var(--ps-text-primary);
  cursor: pointer;
  transition: box-shadow var(--ps-transition), transform var(--ps-transition), border-color var(--ps-transition);
}

.ps-category-tile:hover {
  border-color: rgba(34, 34, 34, 0.2);
  box-shadow: var(--ps-shadow-floating);
  transform: translateY(-2px);
}

.ps-category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--ps-radius-full);
  background: var(--ps-bg-soft);
  font-size: 26px;
  transition: transform var(--ps-transition);
}

.ps-category-tile:hover .ps-category-icon {
  transform: scale(1.05);
}

/* Soft tint rotation for icon circles, matching the wireframe's category palette */
.ps-category-tile:nth-child(6n + 1) .ps-category-icon { background: #fdf2f8; } /* pink-50 */
.ps-category-tile:nth-child(6n + 2) .ps-category-icon { background: #fff7ed; } /* orange-50 */
.ps-category-tile:nth-child(6n + 3) .ps-category-icon { background: #faf5ff; } /* purple-50 */
.ps-category-tile:nth-child(6n + 4) .ps-category-icon { background: #ecfdf5; } /* emerald-50 */
.ps-category-tile:nth-child(6n + 5) .ps-category-icon { background: #eff6ff; } /* blue-50 */
.ps-category-tile:nth-child(6n + 6) .ps-category-icon { background: #fff1f2; } /* rose-50 */

/* Badges */
.ps-badge-top-rated {
  position: absolute;
  top: var(--ps-space-md);
  left: var(--ps-space-md);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--ps-radius-full);
  background: #ffffff;
  color: var(--ps-text-primary);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--ps-shadow-soft);
}

.ps-badge-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: var(--ps-radius-full);
  background: var(--ps-success);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.ps-badge-verified-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--ps-radius-full);
  background: var(--ps-success-light);
  color: var(--ps-success);
  font-size: 12px;
  font-weight: 700;
}

/* Favorite (heart) button overlaid on images */
.ps-fav-button {
  position: absolute;
  top: var(--ps-space-md);
  right: var(--ps-space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: var(--ps-radius-full);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ps-text-primary);
  font-size: 17px;
  cursor: pointer;
  box-shadow: var(--ps-shadow-soft);
  transition: transform var(--ps-transition);
}

.ps-fav-button:hover {
  transform: scale(1.08);
}

.ps-fav-button-active {
  color: var(--ps-location);
}

/* Feature strip: 4-up icon + label row on detail pages */
.ps-feature-strip {
  display: flex;
  justify-content: space-between;
  gap: var(--ps-space-sm);
  padding: var(--ps-space-lg);
  background: var(--ps-primary-light);
  border-radius: var(--ps-radius-lg);
}

.ps-feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  text-align: center;
  color: var(--ps-primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.ps-feature-item-icon {
  font-size: 22px;
}

/* Images */
.ps-vendor-list-image {
  width: 140px;
  height: 120px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
}

.ps-detail-hero-image {
  width: 100%;
  height: 260px;
  border-radius: 16px;
  object-fit: cover;
}

.ps-thumbnail-image {
  width: 96px;
  height: 64px;
  border-radius: var(--ps-radius-sm);
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
}

.ps-thumbnail-selected {
  border-color: var(--ps-primary);
}

/* Gallery overlays */
.ps-gallery-counter {
  position: absolute;
  bottom: var(--ps-space-md);
  right: var(--ps-space-md);
  padding: 4px 12px;
  border-radius: var(--ps-radius-full);
  background: rgba(17, 24, 39, 0.6);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

.ps-gallery-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.ps-gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--ps-radius-full);
  background: var(--ps-border);
  transition: background var(--ps-transition);
}

.ps-gallery-dot-active {
  background: var(--ps-primary);
}

/* Search */
.ps-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ps-search-icon {
  position: absolute;
  left: 16px;
  font-size: 17px;
  color: var(--ps-text-muted);
  pointer-events: none;
}

.ps-search-bar {
  width: 100%;
  height: 54px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-lg);
  background: var(--ps-bg);
  padding: 0 16px;
  font-size: 15px;
  font-family: var(--ps-font-family);
  color: var(--ps-text-primary);
  box-shadow: var(--ps-shadow-soft);
  box-sizing: border-box;
}

.ps-search-wrap .ps-search-bar {
  padding-left: 44px;
}

.ps-search-bar::placeholder {
  color: var(--ps-text-light);
}

/* Rating */
.ps-rating {
  color: var(--ps-rating);
  font-size: 14px;
  font-weight: 700;
}

/* Review summary: big score + star-distribution bars */
.ps-review-score {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ps-text-primary);
}

.ps-rating-bar {
  flex: 1;
  height: 6px;
  border-radius: var(--ps-radius-full);
  background: var(--ps-border-soft);
  overflow: hidden;
}

.ps-rating-bar-fill {
  height: 100%;
  border-radius: var(--ps-radius-full);
  background: var(--ps-primary);
}

/* Review card */
.ps-review-card {
  background: var(--ps-card);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-lg);
  box-shadow: var(--ps-shadow-soft);
  padding: var(--ps-space-lg);
}

.ps-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--ps-radius-full);
  background: var(--ps-primary-light);
  color: var(--ps-primary);
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Enquiry banner: "Can't find what you need?" */
.ps-enquiry-banner {
  display: flex;
  align-items: center;
  gap: var(--ps-space-lg);
  padding: var(--ps-space-lg);
  background: var(--ps-section-soft);
  border-radius: var(--ps-radius-lg);
}

.ps-enquiry-banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--ps-radius-full);
  background: #ffffff;
  font-size: 24px;
  flex-shrink: 0;
}

.ps-enquiry-banner-body {
  flex: 1;
}

/* Header */
.ps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--ps-space-xl);
}

.ps-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ps-location);
  font-size: 14px;
  font-weight: 700;
}

/* Bottom Navigation */
.ps-bottom-nav {
  height: var(--ps-bottom-nav-height);
  background: #ffffff;
  border-top: 1px solid var(--ps-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: var(--ps-z-nav);
}

.ps-nav-item {
  color: var(--ps-text-muted);
  font-size: 12px;
  font-weight: 500;
}

.ps-nav-item-active {
  color: var(--ps-primary);
  font-weight: 700;
}

/* Detail Page Sticky CTA */
.ps-sticky-cta {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: var(--ps-space-md);
  padding: var(--ps-space-lg);
  padding-bottom: calc(var(--ps-space-lg) + env(safe-area-inset-bottom));
  background: #ffffff;
  border-top: 1px solid var(--ps-border);
  z-index: var(--ps-z-sticky);
}

/* Utilities */
.ps-row {
  display: flex;
  align-items: center;
}

.ps-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ps-gap-sm {
  gap: var(--ps-space-sm);
}

.ps-gap-md {
  gap: var(--ps-space-md);
}

.ps-gap-lg {
  gap: var(--ps-space-lg);
}

.ps-rounded {
  border-radius: var(--ps-radius-lg);
}

.ps-shadow {
  box-shadow: var(--ps-shadow-card);
}

/* Responsive */
@media (max-width: 480px) {
  :root {
    --ps-screen-padding: 20px;
  }

  .ps-screen-title {
    font-size: 30px;
  }

  .ps-vendor-card {
    gap: 12px;
  }

  .ps-vendor-list-image {
    width: 120px;
    height: 110px;
  }
}
