html {
  height: 100%;
}

body,
body.site-body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  padding: 0;
  background: #f4f4f4;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1 0 auto;
  width: 100%;
}

.navbar.bg-dark {
  background-color: #212529 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}

.navbar-brand img {
  height: 40px;
  width: auto;
}

.navbar .nav-link {
  color: rgba(255,255,255,.85) !important;
}

.navbar .nav-link:hover {
  color: #fff !important;
}

.navbar .btn.btn-success {
  line-height: 1.2;
}

.hero-section {
  background-image: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)), url('../sample-image.jpg');
  background-size: cover;
  background-position: center;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.hero-content {
  background: rgba(0,0,0,.5);
  padding: 15px 20px;
  border-radius: 10px;
  width: min(640px, 92vw);
}

.hero-content h1 {
  font-size: 2em;
  margin: 0 0 10px;
}

.hero-content p {
  font-size: 1em;
  margin: 0 0 15px;
}

.hero-content .form-inline {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-content .form-control {
  width: 100%;
  max-width: 300px;
}

.categories-section,
.listings-section,
.content-section {
  padding: 30px 0;
}

.categories-section h2 {
  font-size: 1.5em;
  margin-bottom: 15px;
  text-align: center;
}

.category {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,.1);
  text-align: center;
  margin-bottom: 15px;
  transition: transform .3s, box-shadow .3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.category:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0,0,0,.2);
  text-decoration: none;
  color: inherit;
}

.category i {
  font-size: 2em;
  color: #007bff;
  margin-bottom: 10px;
}

.category span,
.category div {
  font-size: .9em;
  color: #333;
}

.business-header {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  margin: 0 0 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.business-header-content {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 28px;
  align-items: start;
}

.business-logo {
  width: 150px;
  height: 150px;
  border-radius: 12px;
  object-fit: contain;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 12px;
  display: block;
}

.business-details h1 {
  font-size: 1.85rem;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.25;
}

.business-details .meta {
  color: #6b7280;
  font-size: .95rem;
}

.contact-info {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6b7280;
  font-size: .95rem;
}

.contact-item i {
  width: 18px;
  color: #2563eb;
  text-align: center;
}

.contact-item a {
  color: #2563eb;
}

.listing-rating-card {
  min-width: 140px;
  text-align: center;
  padding: 18px 16px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.listing-rating-card .rating-number {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}

.listing-rating-card .rating-label {
  margin-top: 6px;
  font-weight: 600;
  color: #374151;
}

.listing-rating-card .rating-count {
  margin-top: 4px;
  color: #6b7280;
  font-size: .9rem;
}

.content-card {
  background: #fff;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.content-card h2 {
  font-size: 1.25rem;
  margin: 0 0 12px;
}

.description-text {
  color: #374151;
  line-height: 1.65;
}

@media (max-width: 768px) {
  .business-header-content {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .business-logo {
    width: 120px;
    height: 120px;
  }

  .listing-rating-card {
    width: 100%;
  }
}

.dealer {
  background: #fff;
  margin-bottom: 15px;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,.1);
}

.dealer-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.dealer-logo {
  max-width: 80px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin-right: 15px;
  background: #fff;
}

.dealer-info {
  flex-grow: 1;
  min-width: 150px;
}

.dealer-info h2 {
  margin-top: 0;
  margin-bottom: 4px;
  font-size: 1.2em;
}

.dealer-info p,
.dealer-info .meta {
  margin: 5px 0;
  font-size: .85em;
  color: #777;
}

.rating-info {
  text-align: right;
  margin-left: 15px;
  min-width: 120px;
}

.star-rating {
  color: #FFD700;
  font-size: 1.2em;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.trust-score {
  color: #555;
  font-size: .9em;
  margin-left: 5px;
}

.review-count {
  color: #777;
  font-size: .8em;
  margin-top: 5px;
  text-align: right;
}

a.text-decoration-none:hover {
  text-decoration: none !important;
}

.review-card {
  background: #fff;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,.06);
}

.rating-card {
  background: #fff;
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 2px 5px rgba(0,0,0,.08);
  text-align: center;
}

.rating-number {
  font-size: 2.5rem;
  font-weight: 700;
}

.pagination-wrap,
.pagination {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  flex-wrap: wrap;
}

.pagination-wrap a,
.pagination-wrap span,
.pagination a,
.pagination span.ellipsis {
  color: #007bff;
  padding: 8px 12px;
  text-decoration: none;
  border: 1px solid #ddd;
  margin: 3px;
  border-radius: 4px;
  background: #fff;
}

.pagination-wrap a.active,
.pagination-wrap a:hover,
.pagination a.active,
.pagination a:hover {
  background: #007bff;
  color: #fff;
}

.site-footer {
  background: #222;
  color: #bbb;
  padding: 1.5rem 0;
  margin-top: auto;
  font-size: .9rem;
  flex-shrink: 0;
  width: 100%;
}

.site-footer a {
  color: #ddd;
}

.site-footer .footer-sep {
  margin: 0 0.45rem;
  color: #777;
  user-select: none;
}

.alert-pending {
  background: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  padding: .75rem 1rem;
  border-radius: 6px;
}

.admin-wrap {
  max-width: 960px;
  margin: 2rem auto;
}

.admin-table {
  background: #fff;
}

.text-warning {
  color: #f0ad4e !important;
}

@media (max-width: 576px) {
  .rating-info {
    width: 100%;
    text-align: left;
    margin-left: 0;
    margin-top: 10px;
  }
  .star-rating {
    justify-content: flex-start;
  }
  .review-count {
    text-align: left;
  }
}
