/* =========================================================
   Rebel Rides Golf Carts — Design System
   Palette pulled from logo/showroom photography:
   near-black, copper/bronze metal, warm amber glow, leather brown
   ========================================================= */

:root {
  --black: #0c0b0a;
  --charcoal: #17140f;
  --charcoal-light: #221d17;
  --line: #35301f;

  --copper: #b3773f;
  --copper-light: #d9a05c;
  --copper-dark: #8a5a2c;
  --gold-glow: #e8b565;

  --leather: #7a4a2b;
  --cream: #f4ede0;
  --cream-dim: #cfc3ac;

  --success: #6fae72;
  --error: #d9765c;

  --font-display: "Playfair Display", "Georgia", serif;
  --font-body: "Poppins", "Segoe UI", sans-serif;

  --container: 1200px;
  --radius: 4px;
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: #fff;
}

h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

p {
  margin: 0 0 1em;
  color: var(--cream-dim);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper-light);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--copper-light);
}

.section {
  padding: 70px 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 44px;
}

.section-head.left {
  margin: 0 0 44px;
  text-align: left;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--copper-light), var(--copper-dark));
  color: #14100a;
}

.btn-primary:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-outline {
  background: transparent;
  border-color: var(--copper);
  color: var(--cream);
}

.btn-outline:hover {
  background: rgba(179, 119, 63, 0.14);
  border-color: var(--copper-light);
}

.btn-ghost {
  background: rgba(244, 237, 224, 0.06);
  color: var(--cream);
  border-color: rgba(244, 237, 224, 0.18);
}

.btn-ghost:hover {
  background: rgba(244, 237, 224, 0.12);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 0.82rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(12, 11, 10, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: var(--container);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  height: 46px;
  width: 46px;
  border-radius: 50%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text .name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: 0.02em;
}

.brand-text .loc {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper-light);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--cream-dim);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--copper-light);
  border-color: var(--copper-light);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-phone {
  display: none;
  font-size: 0.85rem;
  color: var(--cream-dim);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--cream);
  transition: all 0.25s ease;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--charcoal);
  border-top: 1px solid var(--line);
  padding: 10px 20px 24px;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--cream);
  font-size: 1rem;
}

.mobile-nav .btn {
  margin-top: 16px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  background-image: linear-gradient(180deg, rgba(12, 11, 10, 0.25) 0%, rgba(12, 11, 10, 0.5) 55%, rgba(12, 11, 10, 0.96) 100%), url("../images/facebook-photos/CoverPhoto-mobile.jpg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 11, 10, 0.1) 0%, rgba(12, 11, 10, 0.2) 30%, rgba(12, 11, 10, 0.6) 60%, rgba(12, 11, 10, 0.97) 82%, rgba(12, 11, 10, 0.99) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: 40px;
  text-align: center;
}

.hero-tagline {
  max-width: 520px;
  margin: 0 auto 24px;
  color: var(--cream-dim);
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.badge-row .badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--cream-dim);
  text-transform: uppercase;
}

.badge svg {
  width: 16px;
  height: 16px;
  stroke: var(--copper-light);
  flex-shrink: 0;
}

@media (max-width: 899px) {
  /* Mobile hero is the background image and nothing else — no overlaid
     text or buttons. aspect-ratio matches CoverPhoto-mobile.jpg's own
     dimensions exactly (765/890) so the full logo, wordmark, and cart
     always show completely, with zero cropping, regardless of screen
     size. If that image file is ever replaced, update this ratio to
     match the new file's dimensions. */
  .hero {
    aspect-ratio: 765 / 890;
    min-height: 0;
    /* Much lighter than the desktop/original gradient — that darkening
       existed to keep overlaid text legible, which no longer applies
       here since there's no text on top of the image anymore. */
    background-image: linear-gradient(180deg, rgba(12, 11, 10, 0.05) 0%, rgba(12, 11, 10, 0.15) 70%, rgba(12, 11, 10, 0.35) 100%), url("../images/facebook-photos/CoverPhoto-mobile.jpg");
  }

  .hero::after {
    background: none;
  }

  /* Everything in the hero overlay stays hidden except the single
     "Browse Inventory" CTA — it has its own solid background so it
     reads fine over any part of the image. */
  .hero-tagline,
  .badge-row,
  .hero-actions .btn-outline {
    display: none;
  }

  .hero-content {
    padding-bottom: 24px;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-actions .btn-primary {
    width: 80%;
    max-width: 320px;
  }
}

@media (min-width: 900px) {
  .hero {
    min-height: 116vh;
    min-height: 116svh;
    background-image: linear-gradient(180deg, rgba(12, 11, 10, 0.15) 0%, rgba(12, 11, 10, 0.3) 40%, rgba(12, 11, 10, 0.55) 55%, rgba(12, 11, 10, 0.9) 72%, rgba(12, 11, 10, 0.98) 100%), url("../images/facebook-photos/CoverPhoto.jpg");
    background-position: center;
  }

  .hero::after {
    background: none;
  }

  .hero-content {
    padding-bottom: 20px;
  }

  .badge-row {
    margin-top: 16px;
    padding-top: 16px;
  }
}

/* ---------- Page header (inner pages) ---------- */
.page-header {
  position: relative;
  padding: 130px 0 60px;
  background-size: cover;
  background-position: center;
  text-align: center;
}

.page-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 11, 10, 0.75), rgba(12, 11, 10, 0.94));
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-header p {
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Brand strip ---------- */
.brand-strip {
  padding: 34px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.brand-strip .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 48px;
}

.brand-strip .label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-right: 6px;
}

.brand-strip .mark {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--copper-light);
  letter-spacing: 0.03em;
}

@media (max-width: 640px) {
  .brand-strip .container {
    gap: 10px 24px;
  }

  .brand-strip .label {
    flex-basis: 100%;
    text-align: center;
    margin-right: 0;
  }
}

/* ---------- Cards / Grid ---------- */
.grid {
  display: grid;
  gap: 26px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 980px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: linear-gradient(180deg, var(--charcoal-light), var(--charcoal));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--copper);
  box-shadow: var(--shadow-lg);
}

/* Cart placeholder media (no product photography yet) */
.cart-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 30% 20%, rgba(179, 119, 63, 0.22), transparent 55%),
    linear-gradient(135deg, #221d17, #0c0b0a);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-media svg {
  width: 46%;
  stroke: var(--copper);
  opacity: 0.85;
}

.cart-media .tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(12, 11, 10, 0.75);
  border: 1px solid var(--copper);
  color: var(--copper-light);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 3px;
}

.cart-media.has-photo {
  aspect-ratio: 21 / 20;
  background: var(--charcoal);
  overflow: hidden;
}

.cart-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.color-swatches {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  padding: 0;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.swatch:hover {
  transform: scale(1.1);
}

.swatch.active {
  border-color: var(--copper-light);
  box-shadow: 0 0 0 2px rgba(217, 160, 92, 0.25);
}

.swatch-label {
  font-size: 0.78rem;
  color: var(--cream-dim);
  margin-left: 2px;
}

.cart-body {
  padding: 22px;
}

.cart-body h3 {
  margin-bottom: 6px;
}

.cart-title-link {
  color: inherit;
  text-decoration: none;
}

.cart-title-link:hover {
  color: var(--copper-light);
}

.cart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.78rem;
  color: var(--copper-light);
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}

.cart-price {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 16px;
}

.cart-price span {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--cream-dim);
  display: block;
  margin-top: 2px;
  letter-spacing: 0.03em;
}

.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Value prop / icon cards */
.value-card {
  text-align: center;
  padding: 30px 20px;
}

.value-card .icon-wrap {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(179, 119, 63, 0.14);
  border: 1px solid var(--copper);
  display: flex;
  align-items: center;
  justify-content: center;
}

.value-card svg {
  width: 26px;
  height: 26px;
  stroke: var(--copper-light);
}

.value-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.value-card p {
  font-size: 0.88rem;
  margin: 0;
}

/* ---------- Filter tabs ---------- */
.filter-group {
  margin-bottom: 28px;
}

.filter-label {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 12px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 0;
}

.grid#inventory-grid,
#inventory-grid.grid {
  margin-top: 40px;
}

.filter-trigger-btn {
  display: none;
}

.filter-panel-apply {
  display: none;
}

@media (max-width: 767px) {
  .filter-trigger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 8px;
  }

  #filter-panel .filter-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  #filter-panel .filter-tabs button {
    white-space: normal;
  }

  .filter-panel-apply {
    display: block;
    margin-top: 10px;
  }
}

@media (min-width: 768px) {
  #filter-panel {
    display: block;
    position: static;
    background: none;
    backdrop-filter: none;
    padding: 0;
    z-index: auto;
  }

  #filter-panel .modal {
    max-width: none;
    padding: 0;
    border: none;
    box-shadow: none;
    background: none;
  }

  #filter-panel .modal-close,
  #filter-panel h3 {
    display: none;
  }
}

.filter-tabs button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--cream-dim);
  padding: 10px 20px;
  border-radius: 30px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-tabs button.active,
.filter-tabs button:hover {
  border-color: var(--copper);
  color: var(--copper-light);
  background: rgba(179, 119, 63, 0.12);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--cream-dim);
}

/* ---------- Two column feature ---------- */
.split {
  display: grid;
  gap: 40px;
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.reverse > *:first-child { order: 2; }
}

.split img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* ---------- Cart detail page ---------- */
#cart-detail-content .split {
  align-items: start;
  row-gap: 22px;
  grid-template-areas:
    "photo"
    "swatches"
    "heading"
    "body";
}

@media (min-width: 900px) {
  #cart-detail-content .split {
    grid-template-areas:
      "photo heading"
      "photo swatches"
      "photo body";
  }
}

.detail-gallery { grid-area: photo; min-width: 0; }
.detail-heading { grid-area: heading; }
.detail-swatches { grid-area: swatches; }
.detail-body { grid-area: body; }

.detail-extras {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.detail-features-block {
  margin-bottom: 28px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--cream-dim);
  margin-bottom: 28px;
}

.back-link:hover {
  color: var(--copper-light);
}

.detail-photo-wrap {
  aspect-ratio: 21 / 20;
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 30%, rgba(179, 119, 63, 0.14), transparent 60%), var(--charcoal);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 14px;
}

.detail-photo-wrap.has-photo {
  padding: 0;
}

.detail-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  box-shadow: none;
}

.detail-photo-wrap svg {
  width: 46%;
  stroke: var(--copper);
  opacity: 0.85;
}

.photo-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 20px;
  scrollbar-width: thin;
}

.photo-thumb {
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid var(--line);
  cursor: pointer;
  background: var(--charcoal);
  transition: border-color 0.2s ease;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}

.photo-thumb:hover {
  border-color: var(--copper);
}

.photo-thumb.active {
  border-color: var(--copper-light);
  box-shadow: 0 0 0 2px rgba(217, 160, 92, 0.25);
}

.color-thumb-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
}

.color-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.color-thumb-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--line);
  background: var(--charcoal);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.color-thumb-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}

.color-thumb:hover .color-thumb-photo {
  transform: scale(1.03);
}

.color-thumb.active .color-thumb-photo {
  border-color: var(--copper-light);
  box-shadow: 0 0 0 2px rgba(217, 160, 92, 0.25);
}

.color-thumb-label {
  font-size: 0.74rem;
  color: var(--cream-dim);
  text-align: center;
  line-height: 1.2;
}

.color-thumb.active .color-thumb-label {
  color: var(--copper-light);
}

@media (max-width: 640px) {
  .color-thumb-swatches {
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  }
}

.detail-features {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  column-gap: 32px;
}

.detail-features li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--cream-dim);
  font-size: 0.92rem;
}

.detail-features svg {
  width: 18px;
  height: 18px;
  stroke: var(--copper-light);
  flex-shrink: 0;
  margin-top: 2px;
}

.detail-documents {
  margin: 4px 0 24px;
}

.document-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.document-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--cream-dim);
  font-size: 0.85rem;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.document-link:hover {
  border-color: var(--copper);
  color: var(--copper-light);
}

.document-link svg {
  width: 16px;
  height: 16px;
  stroke: var(--copper-light);
  flex-shrink: 0;
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
}

@media (min-width: 480px) {
  .detail-actions {
    flex-direction: row;
  }
}

.stat-row {
  display: flex;
  gap: 30px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.stat-row .stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--copper-light);
}

.stat-row .stat span {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

/* ---------- Lender / financing cards ---------- */
.lender-card {
  padding: 30px 26px;
  text-align: center;
}

.lender-card .icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(179, 119, 63, 0.14);
  border: 1px solid var(--copper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  color: var(--copper-light);
  font-size: 1.4rem;
}

.logo-plate {
  width: 100%;
  max-width: 220px;
  height: 84px;
  margin: 0 auto 20px;
  background: var(--cream);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
}

.logo-plate img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-plate.dark {
  background: var(--black);
  border: 1px solid var(--line);
}

.partner-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--copper-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.partner-link:hover {
  color: var(--cream);
}

.lender-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  text-align: left;
  font-size: 0.85rem;
  color: var(--cream-dim);
}

.lender-card li {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
}

.lender-card li:last-child {
  border-bottom: none;
}

.lender-card li svg {
  width: 15px;
  height: 15px;
  stroke: var(--copper-light);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 18px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 7px;
  color: var(--cream-dim);
}

.form-row {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .form-row-2 { grid-template-columns: 1fr 1fr; }
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--black);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--copper);
}

.form-group textarea {
  resize: vertical;
  min-height: 110px;
}

.deposit-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.deposit-options label {
  flex: 1;
  min-width: 90px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.deposit-options input {
  display: none;
}

.deposit-options input:checked + span {
  color: var(--copper-light);
}

.deposit-options label:has(input:checked) {
  border-color: var(--copper);
  background: rgba(179, 119, 63, 0.12);
}

.form-note {
  font-size: 0.76rem;
  color: var(--cream-dim);
  margin-top: -6px;
}

.form-status {
  display: none;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.form-status.success {
  display: block;
  background: rgba(111, 174, 114, 0.14);
  border: 1px solid var(--success);
  color: #b7dcb8;
}

.form-status.info {
  display: block;
  background: rgba(179, 119, 63, 0.12);
  border: 1px solid var(--copper);
  color: var(--copper-light);
}

.form-status.error {
  display: block;
  background: rgba(217, 118, 92, 0.14);
  border: 1px solid var(--error);
  color: #f0b3a2;
}

.hidden-field {
  position: absolute;
  left: -9999px;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  z-index: 500;
}

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

.modal {
  background: var(--charcoal);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  padding: 34px 28px;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--cream-dim);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 6px;
}

.modal-close:hover {
  color: var(--copper-light);
}

.modal h3 {
  margin-bottom: 6px;
}

.modal .modal-sub {
  font-size: 0.85rem;
  margin-bottom: 22px;
}

/* ---------- Showroom / map ---------- */
.info-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.info-list li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--cream-dim);
}

.info-list svg {
  width: 18px;
  height: 18px;
  stroke: var(--copper-light);
  flex-shrink: 0;
  margin-top: 2px;
}

.info-list strong {
  color: var(--cream);
  display: block;
}

.map-embed {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.4) invert(0.92) contrast(0.9);
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--charcoal-light), var(--black));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: 64px 0;
}

.cta-banner p {
  max-width: 480px;
  margin: 0 auto 26px;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--charcoal);
  border-top: 1px solid var(--line);
  padding: 56px 0 26px;
}

.footer-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: 1fr;
  margin-bottom: 40px;
}

@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

.footer-brand .brand {
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 0.88rem;
  max-width: 280px;
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.social-links a {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.social-links a:hover {
  border-color: var(--copper);
  background: rgba(179, 119, 63, 0.14);
}

.social-links svg {
  width: 17px;
  height: 17px;
  stroke: var(--cream);
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper-light);
  margin-bottom: 16px;
}

.footer-col a,
.footer-col p {
  display: block;
  font-size: 0.88rem;
  color: var(--cream-dim);
  margin-bottom: 10px;
}

.footer-col a:hover {
  color: var(--copper-light);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--cream-dim);
}

/* ---------- Desktop nav breakpoint ---------- */
@media (max-width: 899px) {
  .main-nav { display: none; }
  .header-cta .btn-outline { display: none; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
  .header-phone { display: block; }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.section-alt {
  background: var(--charcoal);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------- Admin portal ---------- */
.admin-body {
  min-height: 100vh;
  background: var(--black);
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--charcoal);
  flex-wrap: wrap;
}

.admin-header .brand img {
  height: 38px;
  width: 38px;
  border-radius: 50%;
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.admin-nav a {
  font-size: 0.88rem;
  color: var(--cream-dim);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
}

.admin-nav a.active,
.admin-nav a:hover {
  color: var(--copper-light);
  border-color: var(--copper-light);
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--cream-dim);
}

.role-badge {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 30px;
  border: 1px solid var(--copper);
  color: var(--copper-light);
}

.admin-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 26px;
}

.admin-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.admin-table th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copper-light);
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--charcoal);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--cream-dim);
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 30px;
  letter-spacing: 0.03em;
}

.status-pill.on {
  background: rgba(111, 174, 114, 0.14);
  color: #9fd6a1;
  border: 1px solid var(--success);
}

.status-pill.off {
  background: rgba(217, 118, 92, 0.1);
  color: #e8a893;
  border: 1px solid var(--error);
}

.status-pill.new {
  background: rgba(179, 119, 63, 0.16);
  color: var(--copper-light);
  border: 1px solid var(--copper);
}

.status-pill.contacted {
  background: rgba(244, 237, 224, 0.08);
  color: var(--cream-dim);
  border: 1px solid var(--line);
}

.status-pill.closed {
  background: rgba(111, 174, 114, 0.14);
  color: #9fd6a1;
  border: 1px solid var(--success);
}

.icon-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--cream-dim);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  margin-right: 6px;
}

.icon-btn:hover {
  border-color: var(--copper);
  color: var(--copper-light);
}

.icon-btn.danger:hover {
  border-color: var(--error);
  color: #e8a893;
}

.color-row {
  display: grid;
  grid-template-columns: 1fr 100px 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

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

.doc-row {
  grid-template-columns: 1fr 160px 1fr auto;
}

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

.color-name-wrap {
  position: relative;
}

.color-suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 260px;
  overflow-y: auto;
  background: var(--charcoal);
  border: 1px solid var(--copper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.color-suggestions.open {
  display: block;
}

.color-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
}

.color-suggestion:last-child {
  border-bottom: none;
}

.color-suggestion:hover {
  background: rgba(179, 119, 63, 0.14);
}

.color-suggestion-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.color-suggestion-label {
  flex: 1;
}

.color-suggestion-hex {
  font-size: 0.72rem;
  color: var(--cream-dim);
  text-transform: uppercase;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 40px 32px;
  text-align: center;
}

.login-card .brand {
  justify-content: center;
  margin-bottom: 24px;
}

/* ---------- Admin mobile layout ---------- */
@media (max-width: 760px) {
  .admin-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px 16px;
  }

  .admin-header .brand img {
    height: 34px;
    width: 34px;
  }

  .admin-nav {
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .admin-nav a {
    white-space: nowrap;
  }

  .admin-user {
    justify-content: space-between;
  }

  .admin-main {
    padding: 22px 14px 60px;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-toolbar .btn {
    width: 100%;
  }

  .filter-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
    margin-bottom: 20px;
  }

  .filter-tabs button {
    white-space: nowrap;
  }

  /* Card-style table: header row hides, each row becomes a card with
     label/value pairs instead of forcing a horizontal scroll. */
  .admin-table-wrap {
    border: none;
    overflow-x: visible;
  }

  .admin-table {
    min-width: 0;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table tr {
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 4px 16px;
    background: linear-gradient(180deg, var(--charcoal-light), var(--charcoal));
  }

  .admin-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    text-align: right;
  }

  .admin-table td:last-child {
    border-bottom: none;
  }

  .admin-table td::before {
    content: attr(data-label);
    font-size: 0.68rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--copper-light);
    text-align: left;
    flex-shrink: 0;
  }

  .admin-table td[data-label="Actions"] {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .admin-table td[data-label="Actions"]::before {
    display: none;
  }

  .modal-overlay {
    padding: 16px 10px;
    align-items: stretch;
  }

  .modal {
    padding: 26px 18px;
    margin: auto 0;
  }

  .color-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Global loading overlay ---------- */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  background: rgba(12, 11, 10, 0.82);
  backdrop-filter: blur(2px);
  cursor: wait;
}

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

.loading-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(244, 237, 224, 0.15);
  border-top-color: var(--copper-light);
  animation: loading-spin 0.8s linear infinite;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-size: 0.88rem;
  color: var(--cream-dim);
  max-width: 280px;
  text-align: center;
}
