:root {
  --bg-primary: #faf7f2;
  --bg-secondary: #ffffff;
  --bg-accent: #f3ece2;
  --text-primary: #1f1a17;
  --text-secondary: #5c534c;
  --text-muted: #8c8077;
  --brand-primary: #9e2a2b;
  --brand-primary-light: #fbe9e9;
  --brand-gold: #b8860b;
  --brand-gold-light: #fdf6e2;
  --brand-sage: #2d6a4f;
  --brand-sage-light: #e8f5ee;
  --brand-purple: #5a189a;
  --brand-purple-light: #f3e8ff;
  --border-color: #e6ddd3;
  --shadow-sm: 0 2px 8px rgba(31, 26, 23, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 26, 23, 0.09);
  --shadow-lg: 0 16px 40px rgba(31, 26, 23, 0.14);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.55;
  padding-bottom: 90px;
}

/* Header & Hero */
.hero-header {
  background: linear-gradient(135deg, #2b1816 0%, #581c1c 55%, #3d251e 100%);
  color: #fff;
  padding: 36px 24px 32px;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid #d4af37;
}

.hero-container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.5);
  color: #f8dfa5;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  color: #fff9f0;
}

.hero-subtitle {
  font-size: 15px;
  color: rgba(255, 249, 240, 0.85);
  max-width: 880px;
  margin-bottom: 24px;
}

/* KPI Stats Row */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.kpi-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.kpi-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: #f8dfa5;
}

.kpi-label {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 2px;
}

/* Main Container */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* Navigation Mode Tabs */
.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
}

.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-tab:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.mode-tab.active {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}

.tab-count {
  background: rgba(0, 0, 0, 0.12);
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 12px;
}

.mode-tab.active .tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Filter Panel */
.filter-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.filter-top-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr 1fr auto;
  gap: 12px;
  align-items: end;
}

@media (max-width: 1024px) {
  .filter-top-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .filter-top-row {
    grid-template-columns: 1fr;
  }
}

.filter-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.filter-input,
.filter-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background-color: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.filter-input:focus,
.filter-select:focus {
  border-color: var(--brand-primary);
}

.district-pills-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-color);
}

.pill-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-right: 4px;
}

.filter-pill {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.filter-pill.active {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
  font-weight: 600;
}

.service-pill.active {
  background: var(--brand-sage);
  border-color: var(--brand-sage);
  color: #fff;
}

.btn-reset {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-accent);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-reset:hover {
  background: #e5dacb;
}

/* Results Toolbar */
.results-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.results-count {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
}

.results-count strong {
  color: var(--brand-primary);
  font-size: 17px;
}

/* Vendor Cards Grid */
.vendor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 22px;
}

@media (max-width: 480px) {
  .vendor-grid {
    grid-template-columns: 1fr;
  }
}

.vendor-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
}

.vendor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Card Image Carousel */
.card-gallery {
  position: relative;
  height: 235px;
  background: #221d1a;
  overflow: hidden;
}

.card-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  cursor: pointer;
}

.vendor-card:hover .card-gallery img {
  transform: scale(1.03);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  z-index: 3;
  transition: background 0.2s;
}

.gallery-nav:hover {
  background: rgba(0, 0, 0, 0.85);
}

.gallery-prev {
  left: 10px;
}

.gallery-next {
  right: 10px;
}

.gallery-counter {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  z-index: 2;
}

.card-top-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 2;
  pointer-events: none;
}

.district-badge {
  background: rgba(25, 20, 18, 0.82);
  backdrop-filter: blur(6px);
  color: #f8dfa5;
  padding: 4px 11px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(248, 223, 165, 0.35);
}

.rating-badge {
  background: #fff;
  color: #1f1a17;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 4px;
}

.rating-star {
  color: #f59e0b;
}

/* Card Body */
.card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

.service-tag {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.tag-giatien {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.tag-nhahang {
  background: var(--brand-gold-light);
  color: #8a6200;
}

.tag-photobooth {
  background: var(--brand-purple-light);
  color: var(--brand-purple);
}

.tag-other {
  background: var(--brand-sage-light);
  color: var(--brand-sage);
}

.vendor-title {
  font-size: 18.5px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}

.vendor-price-box {
  background: var(--bg-primary);
  border-left: 3px solid var(--brand-primary);
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
  margin: 8px 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.price-value {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--brand-primary);
}

.vendor-meta-list {
  list-style: none;
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vendor-meta-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.meta-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Package Preview inside Card */
.card-packages-preview {
  background: #fdfbf8;
  border: 1px solid #ede5dc;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.pkg-preview-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.pkg-mini-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px dashed #eee4d9;
}

.pkg-mini-row:last-child {
  border-bottom: none;
}

.pkg-mini-name {
  font-weight: 600;
  color: var(--text-primary);
}

.pkg-mini-price {
  font-weight: 700;
  color: var(--brand-sage);
  white-space: nowrap;
  margin-left: 8px;
}

/* Review Snippet inside Card */
.card-review-snippet {
  background: #f9f6f0;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12.8px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 14px;
  border-left: 3px solid #d4af37;
}

.review-author {
  font-style: normal;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

/* Social & Quick Links Row */
.social-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  margin-bottom: 12px;
}

.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: #fff;
  transition: all 0.15s;
}

.social-chip:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-primary-light);
}

/* Card Footer Actions */
.card-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.btn-detail {
  background: var(--brand-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-detail:hover {
  background: #7d1f20;
}

.btn-icon-action {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.btn-icon-action:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.btn-icon-action.active-fav {
  background: #ffe4e6;
  border-color: #e11d48;
  color: #e11d48;
}

.btn-icon-action.active-cmp {
  background: var(--brand-gold-light);
  border-color: var(--brand-gold);
  color: #8a6200;
}

/* Modal Detail Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 14, 0.72);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  width: 100%;
  max-width: 1060px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 20px 24px;
  background: linear-gradient(135deg, #2b1816 0%, #4a1c1c 100%);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.modal-close {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-section-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 22px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--bg-accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-section-title:first-child {
  margin-top: 0;
}

/* Detailed Packages Grid inside Modal */
.packages-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.package-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  background: #fffdf9;
  display: flex;
  flex-direction: column;
}

.package-card-header {
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.package-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.package-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-primary);
  margin-top: 4px;
}

.package-type-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg-accent);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 4px;
}

.package-items-list {
  list-style: none;
  font-size: 13.5px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.package-items-list li::before {
  content: "✓";
  color: var(--brand-sage);
  font-weight: 800;
  margin-right: 8px;
}

/* Portfolio Grid inside Modal */
.modal-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.modal-gallery-item {
  height: 165px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.modal-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}

.modal-gallery-item:hover img {
  transform: scale(1.06);
}

/* Reviews List inside Modal */
.reviews-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.review-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.review-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.reviewer-name {
  font-weight: 700;
  font-size: 14px;
}

.review-source {
  font-size: 11.5px;
  background: #fff;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.review-text {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Comparison Table & Budget Calculator Views */
.comparison-table-wrap {
  overflow-x: auto;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.comparison-table th,
.comparison-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
  font-size: 13.5px;
}

.comparison-table th {
  background: var(--bg-accent);
  font-weight: 800;
  width: 180px;
  color: var(--text-primary);
}

/* Budget Combo Planner */
.combo-planner-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.combo-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.combo-slot {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  background: var(--bg-primary);
}

.combo-total-banner {
  background: linear-gradient(135deg, #2b1816 0%, #581c1c 100%);
  color: #fff;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* Floating Compare Bar */
.floating-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f1a17;
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  display: none;
  align-items: center;
  gap: 16px;
  z-index: 900;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.floating-bar.visible {
  display: flex;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-overlay img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 8px;
  object-fit: contain;
}
