/* B&C Auto Services: same colors as the original site (navy header, blue hero), cleaned up and mobile-first. */
:root {
  --navy: #040f2e;
  --navy-deep: #02081a;
  --blue: #0162f7;
  --blue-dark: #0049bf;
  --blue-hero: #0057b7;
  --text: #1f2430;
  --muted: #5b6475;
  --bg: #f4f6fa;
  --card: #ffffff;
  --border: #dde2ea;
  --danger: #c62828;
  --ok: #1b7f3b;
  --radius: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  /* Same as the original site ("Open Sans" was never loaded there, so it showed as Arial/Helvetica). */
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--blue);
}
h1,
h2,
h3 {
  line-height: 1.2;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.container.narrow {
  max-width: 820px;
}
.center {
  text-align: center;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.875rem;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 8px;
  z-index: 100;
  background: #fff;
  padding: 8px 12px;
  border-radius: 6px;
}
svg {
  vertical-align: -0.15em;
}

/* Header */
.header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  flex-wrap: wrap;
}
.logo img {
  height: 48px;
  width: auto;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  align-items: center;
}
.nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 0;
}
.nav a:hover {
  text-decoration: underline;
}
.nav .nav-call {
  background: var(--blue);
  padding: 8px 14px;
  border-radius: 6px;
}
.nav .nav-call:hover {
  background: var(--blue-dark);
  text-decoration: none;
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 56px 16px;
  color: #fff;
  text-align: center;
  background-color: #000;
  background-image: radial-gradient(circle at center 50%, #0057b7 0%, #0057b7 30%, #000 100%);
}
/* The original site's dark overlay over the blue glow. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.hero-content {
  position: relative;
  max-width: 600px;
}
.hero-logo {
  width: 310px;
  max-width: 80%;
  height: auto;
  margin: 0 auto 16px;
}
.hero-tagline {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.5;
  margin: 0 0 2rem;
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.hero-buttons.left {
  justify-content: flex-start;
  margin-top: 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 6px;
  border: 2px solid var(--blue);
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}
.btn-light {
  background: #fff;
  border-color: #fff;
  color: var(--blue);
}
.btn-light:hover {
  background: #e8efff;
  border-color: #e8efff;
}
.btn-outline {
  background: transparent;
  color: var(--blue);
}
.btn-outline:hover {
  background: #e8efff;
  color: var(--blue-dark);
}
.btn-danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}
.btn-danger:hover {
  background: #fdecec;
  border-color: var(--danger);
}
.btn-small {
  padding: 6px 12px;
  font-size: 0.875rem;
}
.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Sections */
.section {
  padding: 56px 0;
}
.section h2,
.page-title {
  text-align: center;
  font-size: 2rem;
  margin: 0 0 32px;
}
.page-title {
  margin-bottom: 8px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.service-card {
  background: var(--card);
  border-radius: var(--radius);
  text-align: center;
  padding: 28px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.service-icon {
  color: var(--blue);
  margin-bottom: 12px;
}
.service-icon svg {
  margin: 0 auto;
  display: block;
}
.service-card h3 {
  margin: 0 0 8px;
}
.service-card p {
  margin: 0;
  color: var(--muted);
}

.section-cta {
  background: var(--navy);
  color: #fff;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.cta h2 {
  text-align: left;
  margin: 0 0 8px;
  font-size: 1.5rem;
}
.cta p {
  margin: 0;
  opacity: 0.9;
}
.section-cta .btn-outline {
  color: #fff;
  border-color: #fff;
}
.section-cta .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Car sales */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.car-card {
  display: block;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.car-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.car-card-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #e6e9ef;
}
.car-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.car-card.is-sold img {
  filter: grayscale(0.6);
  opacity: 0.8;
}
.car-card-body {
  padding: 14px 16px 18px;
}
.car-card-body h2 {
  font-size: 1.125rem;
  text-align: left;
  margin: 0 0 6px;
}
.car-card-body p {
  margin: 0;
}
.price {
  font-weight: 800;
  color: var(--blue);
  font-size: 1.125rem;
}
.price.big {
  font-size: 1.75rem;
  margin: 0 0 16px;
}
.badge-sold {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--danger);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 4px;
}
.badge-sold.inline {
  position: static;
  display: inline-block;
  margin: 0 0 16px;
}
.no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  background: #e6e9ef;
  font-size: 0.875rem;
}
.no-photo.big {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
}
.empty {
  text-align: center;
  background: var(--card);
  border-radius: var(--radius);
  padding: 40px 16px;
  margin-top: 28px;
}

.car-detail-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: start;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.gallery a {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  background: #e6e9ef;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-main {
  grid-column: 1 / -1;
  aspect-ratio: 4 / 3;
}
.gallery-thumb {
  aspect-ratio: 4 / 3;
}
.car-info h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
}
.specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 0 0 16px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
}
.specs:empty {
  display: none;
}
.specs dt {
  font-weight: 700;
}
.specs dd {
  margin: 0;
}
.description p {
  margin: 0 0 12px;
  white-space: pre-line;
}

/* Footer */
.footer {
  background: var(--navy-deep);
  color: #d8dce6;
  padding: 40px 0 20px;
}
.footer-widgets {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.footer .widget {
  flex: 1 1 220px;
}
.footer h2 {
  font-size: 1.125rem;
  text-align: left;
  margin: 0 0 12px;
  color: #fff;
}
.footer p {
  margin: 0 0 8px;
}
.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer li {
  margin-bottom: 8px;
}
.footer a {
  color: #d8dce6;
  text-decoration: none;
}
.footer a:hover {
  color: #fff;
  text-decoration: underline;
}
.footer-bottom {
  text-align: center;
  margin-top: 24px;
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Admin */
.admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.admin-head h1 {
  margin: 0;
}
.flash {
  background: #e7f6ec;
  color: var(--ok);
  border-radius: 6px;
  padding: 10px 14px;
  font-weight: 600;
}
.error {
  background: #fdecec;
  color: var(--danger);
  border-radius: 6px;
  padding: 10px 14px;
  font-weight: 600;
}
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.admin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.admin-thumb {
  flex: 0 0 120px;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
}
.admin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-info {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.admin-info a {
  color: var(--text);
}
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-actions form,
.photo-actions form {
  margin: 0;
}
.pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.pill-available {
  background: #e7f6ec;
  color: var(--ok);
}
.pill-sold {
  background: #fdecec;
  color: var(--danger);
}
.pill-hidden {
  background: #eceff4;
  color: var(--muted);
}

.car-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
}
.car-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}
.car-form label .muted {
  font-weight: 400;
  font-size: 0.875rem;
}
.car-form input,
.car-form textarea,
.car-form select {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  width: 100%;
}
.car-form input[type="file"] {
  padding: 8px;
}
.car-form input:focus,
.car-form textarea:focus,
.car-form select:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.upload-status:empty {
  display: none;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.photo-tile {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.photo-tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.photo-tile .pill {
  position: absolute;
  top: 8px;
  left: 8px;
}
.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
}

/* Small screens */
@media (max-width: 760px) {
  .section {
    padding: 40px 0;
  }
  .section h2,
  .page-title {
    font-size: 1.6rem;
  }
  .car-detail-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .nav-container {
    justify-content: center;
    padding: 8px 16px;
  }
  .nav {
    justify-content: center;
  }
  .admin-thumb {
    flex-basis: 96px;
    height: 72px;
  }
  .hero {
    min-height: 0;
    padding: 48px 16px;
  }
}
@media (max-width: 440px) {
  .nav {
    gap: 4px 12px;
    font-size: 0.9375rem;
  }
  .nav .nav-call {
    flex-basis: 100%;
    text-align: center;
    justify-content: center;
    display: flex;
    gap: 6px;
    align-items: center;
  }
}

.login-form {
  max-width: 420px;
  margin: 0 auto;
}
.login-form h1 {
  margin: 0;
}
