:root {
  --red: #b5121b;
  --red-bright: #d21f2b;
  --gold: #d99a18;
  --gold-light: #f5c767;
  --black: #171717;
  --ink: #1d1d1d;
  --muted: #747474;
  --light: #fffaf0;
  --white: #ffffff;
  --line: #dedede;
  --green: #27ae60;
  --danger: #b42318;
  --shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  background: #ffffff;
  color: var(--ink);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 24px;
  min-height: 96px;
  padding: 6px clamp(14px, 4vw, 58px);
  background:
    linear-gradient(180deg, #ffffff 0%, #fff9ec 100%);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 8px 24px rgba(181, 18, 27, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 250px;
}

.brand-logo {
  display: block;
  width: min(250px, 42vw);
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(217, 154, 24, 0.24));
}

.topnav {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
}

.topnav a {
  display: grid;
  place-items: center;
  padding: 0 18px;
  color: var(--red);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
  transform: skew(-11deg);
}

.topnav a::first-letter {
  text-transform: uppercase;
}

.topnav a span,
.topnav a {
  letter-spacing: 0;
}

.topnav a:hover {
  color: var(--gold);
}

.topnav a.active {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #4d1111;
}

.search-toggle {
  align-self: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--red);
  cursor: pointer;
  font-size: 2rem;
  font-weight: 700;
}

.quick-search {
  display: none;
  grid-template-columns: 1fr auto;
  background: #ffffff;
  border-bottom: 1px solid #ead8b8;
}

.quick-search.open {
  display: grid;
}

.quick-search input {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 20px clamp(18px, 4vw, 58px);
}

.quick-search input::placeholder {
  color: var(--muted);
}

main {
  width: 100%;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: calc(100vh - 96px);
  min-height: calc(100svh - 96px);
  overflow: hidden;
  background: #ffffff url("fachada-rudys-motors.jpeg") center / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 250, 240, 0.86) 37%, rgba(255, 255, 255, 0.2) 68%, rgba(255, 255, 255, 0.04) 100%),
    linear-gradient(180deg, rgba(181, 18, 27, 0.08), transparent 42%, rgba(38, 18, 12, 0.08));
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 7px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--red));
}

.hero-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100vh - 96px);
  min-height: calc(100svh - 96px);
  max-width: 690px;
  padding: clamp(44px, 7vw, 86px) clamp(22px, 7vw, 110px);
  color: var(--ink);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 660px;
  margin: 0 0 30px;
  font-family: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: clamp(2.5rem, 6vw, 5.8rem);
  font-weight: 800;
  line-height: 0.98;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(217, 154, 24, 0.12);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 12px 20px;
  text-transform: uppercase;
}

.button.primary {
  background: linear-gradient(135deg, var(--red), var(--red-bright));
  color: var(--white);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.22);
}

.button.primary:hover {
  opacity: 0.72;
}

.button.secondary {
  background: var(--light);
  border-color: var(--gold);
  color: var(--black);
}

.button.secondary:hover {
  background: var(--red);
  color: var(--white);
}

.button.dark {
  background: var(--gold);
  color: #4d1111;
}

.hero-visual {
  position: relative;
  min-height: 500px;
}

.hero-road {
  position: absolute;
  right: -10%;
  bottom: 8%;
  width: 115%;
  height: 28%;
  background: linear-gradient(180deg, transparent, rgba(217, 154, 24, 0.2));
  transform: skewY(-4deg);
}

.car-art {
  position: absolute;
  right: clamp(18px, 7vw, 110px);
  bottom: 22%;
  width: min(640px, 86%);
  height: 210px;
}

.car-body {
  position: absolute;
  right: 0;
  bottom: 36px;
  left: 0;
  height: 92px;
  border-radius: 42px 88px 22px 20px;
  background: linear-gradient(135deg, #ffffff, #e6e0d6 48%, var(--gold) 49%, var(--red) 72%, #7b0e15);
  box-shadow: inset 0 -18px 0 rgba(0, 0, 0, 0.12), 0 28px 35px rgba(181, 18, 27, 0.18);
}

.car-window {
  position: absolute;
  top: 24px;
  left: 25%;
  width: 43%;
  height: 84px;
  border: 9px solid #111;
  border-bottom: 0;
  border-radius: 80px 92px 0 0;
  background: linear-gradient(135deg, #d8eff8, #ffffff);
}

.car-line {
  position: absolute;
  right: 9%;
  bottom: 85px;
  left: 15%;
  height: 4px;
  background: rgba(0, 0, 0, 0.34);
}

.wheel {
  position: absolute;
  bottom: 0;
  width: 96px;
  height: 96px;
  border: 18px solid #111;
  border-radius: 50%;
  background: #efefef;
  box-shadow: inset 0 0 0 9px #777;
}

.wheel-left {
  left: 13%;
}

.wheel-right {
  right: 13%;
}

.advanced-search {
  padding: 22px clamp(14px, 4vw, 58px);
  border-top: 4px solid var(--red);
  border-bottom: 1px solid #ead8b8;
  background:
    linear-gradient(90deg, rgba(217, 154, 24, 0.14), transparent 24%, rgba(181, 18, 27, 0.08)),
    var(--light);
}

.advanced-search h2,
.inventory-section h2,
.manage-section h2,
.about-band h2,
.contact-band h2 {
  margin: 0;
  color: #333;
  font-size: clamp(1.65rem, 4vw, 2.55rem);
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.advanced-search h2 {
  margin-bottom: 18px;
}

.filters {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr auto;
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.filters label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  outline: none;
  padding: 12px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217, 154, 24, 0.18);
}

.inventory-section,
.manage-section,
.about-band,
.contact-band {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 16px;
}

.about-company {
  padding: clamp(58px, 8vw, 108px) 16px;
  background:
    linear-gradient(180deg, rgba(217, 154, 24, 0.14), transparent 54%),
    var(--light);
}

.about-company-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.section-kicker {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.about-company-content h2 {
  margin: 0 0 20px;
  color: var(--ink);
  font-family: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: clamp(2.7rem, 5vw, 4.8rem);
  font-weight: 800;
  line-height: 0.95;
  text-transform: uppercase;
}

.about-company-content p:not(.section-kicker) {
  max-width: 850px;
  margin: 0 0 18px;
  color: #5f5f5f;
  line-height: 1.7;
}

.about-company-content .about-company-phrase {
  margin-top: 8px;
  color: var(--red);
  font-weight: 900;
  text-transform: uppercase;
}

.location-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
  min-height: 430px;
  background: var(--white);
}

.location-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(42px, 6vw, 86px);
}

.location-content h2 {
  margin: 0 0 18px;
  color: var(--ink);
  font-family: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: clamp(2.7rem, 5vw, 4.8rem);
  font-weight: 800;
  line-height: 0.95;
  text-transform: uppercase;
}

.location-content > p:not(.section-kicker) {
  max-width: 500px;
  margin: 0 0 20px;
  color: #5f5f5f;
  line-height: 1.7;
}

.location-address {
  max-width: 500px;
  margin-bottom: 24px;
  color: var(--red);
  font-weight: 900;
  line-height: 1.55;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.map-frame {
  min-height: 430px;
  border-left: 4px solid var(--gold);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
  border: 0;
}

.section-heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 20px;
  text-align: center;
}

.section-heading .button {
  position: absolute;
  right: 0;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.vehicle-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid #ead8b8;
  box-shadow: var(--shadow);
}

.vehicle-image {
  position: relative;
  display: grid;
  min-height: 230px;
  place-items: end center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #f7f1e5, #ffffff 45%, #dfc993);
}

.vehicle-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 7px 9px;
  text-transform: uppercase;
}

.vehicle-image.has-photo::before,
.vehicle-image.has-photo::after {
  display: none;
}

.vehicle-image::before {
  content: "";
  position: absolute;
  width: 78%;
  height: 36%;
  bottom: 24%;
  border-radius: 32px 62px 18px 18px;
  background: var(--car-color, #222);
  box-shadow: inset 0 -14px 0 rgba(0, 0, 0, 0.18);
}

.vehicle-image::after {
  content: "";
  position: absolute;
  width: 50%;
  height: 28%;
  bottom: 48%;
  border: 7px solid #111;
  border-bottom: 0;
  border-radius: 64px 76px 0 0;
  background: rgba(255, 255, 255, 0.82);
}

.price {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 2;
  margin: 0;
  background: var(--light);
  color: var(--black);
  font-size: 1.05rem;
  font-weight: 900;
  padding: 11px 20px;
}

.status-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: linear-gradient(135deg, var(--red), var(--red-bright));
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 7px 10px;
  text-transform: uppercase;
}

.vehicle-card-content {
  padding: 18px 16px 0;
  text-align: center;
  text-transform: uppercase;
}

.vehicle-title h3 {
  position: relative;
  margin: 0 0 24px;
  font-size: 1.18rem;
}

.vehicle-title h3::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: -13px;
  width: 176px;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  transform: translateX(50%);
}

.vehicle-title span {
  display: none;
}

.specs {
  display: block;
  margin: 0;
}

.specs div {
  display: inline;
}

.specs div:not(:last-child)::after {
  content: " | ";
  color: var(--muted);
  font-weight: 700;
}

.specs dt {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.specs dd {
  display: inline;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.notes {
  display: -webkit-box;
  min-height: 42px;
  margin: 12px 0 16px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
  text-transform: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.view-link {
  display: block;
  margin: 0 -16px;
  background: var(--light);
  color: var(--black);
  font-weight: 900;
  padding: 10px;
  text-transform: lowercase;
}

.view-link:hover {
  background: linear-gradient(135deg, var(--red), var(--gold));
  color: var(--white);
}

.about-band {
  max-width: none;
  background:
    linear-gradient(180deg, rgba(217, 154, 24, 0.1), transparent),
    var(--light);
}

.about-band > h2,
.about-band > p,
.about-band .metrics {
  max-width: 1180px;
  margin-right: auto;
  margin-left: auto;
}

.about-band > p {
  max-width: 780px;
  color: #666;
  line-height: 1.7;
  text-align: center;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.metrics article {
  background: var(--white);
  border-top: 4px solid var(--gold);
  padding: 18px;
  text-align: center;
}

.metrics span {
  display: block;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.metrics strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.manager-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(460px, 1.1fr);
  gap: 18px;
  align-items: start;
  margin-top: 22px;
}

.vehicle-form,
.table-wrap {
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
}

.vehicle-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.photo-input input {
  padding: 9px;
}

.photo-help {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: none;
}

.photo-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 108px;
  border: 1px solid #ead8b8;
  background: var(--light);
  padding: 10px;
}

.photo-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.photo-preview-item {
  position: relative;
  width: 94px;
  height: 78px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #ead8b8;
  background: var(--white);
}

.photo-preview-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-item figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(181, 18, 27, 0.92);
  color: var(--white);
  font-size: 0.61rem;
  font-weight: 900;
  padding: 3px 4px;
  text-align: center;
  text-transform: uppercase;
}

.wide {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  min-width: 74px;
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
  font-weight: 900;
  padding: 8px 10px;
}

.icon-button:hover {
  background: var(--light);
}

.icon-button.danger {
  color: var(--danger);
}

.contact-band {
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  background:
    linear-gradient(90deg, rgba(181, 18, 27, 0.08), rgba(217, 154, 24, 0.18)),
    #ffffff;
  color: var(--ink);
  border-top: 3px solid var(--gold);
}

.contact-band h2 {
  color: var(--red);
  text-align: left;
}

.contact-band p {
  margin-bottom: 0;
  color: #5f5f5f;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.floating-contacts {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: grid;
  gap: 10px;
}

.floating-contact {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--white);
  color: var(--white);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.whatsapp-menu {
  position: relative;
}

.whatsapp-menu summary {
  list-style: none;
  cursor: pointer;
}

.whatsapp-menu summary::-webkit-details-marker {
  display: none;
}

.whatsapp-options {
  position: absolute;
  top: 0;
  right: 70px;
  width: 220px;
  overflow: hidden;
  border: 1px solid #ead8b8;
  background: var(--white);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
}

.whatsapp-options a {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
}

.whatsapp-options a + a {
  border-top: 1px solid #ead8b8;
}

.whatsapp-options a:hover {
  background: var(--light);
}

.whatsapp-options strong {
  color: var(--red);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.whatsapp-options span {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.floating-contact img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.floating-contact:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
}

.floating-contact.whatsapp {
  border: 2px solid #18bc4b;
}

.floating-contact.instagram {
  border: 2px solid var(--gold);
}

.empty-state {
  border: 1px dashed var(--line);
  background: white;
  color: var(--muted);
  font-weight: 900;
  padding: 28px;
  text-align: center;
}

@media (max-width: 980px) {
  .topbar {
    flex-wrap: wrap;
    justify-content: space-between;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .topnav {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .topnav a {
    min-height: 48px;
    padding: 0 14px;
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters .button {
    grid-column: 1 / -1;
  }

  .inventory-grid,
  .metrics,
  .manager-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-layout {
    grid-template-columns: 1fr;
  }

  .location-section {
    grid-template-columns: 1fr;
  }

  .map-frame {
    min-height: 340px;
    border-top: 4px solid var(--gold);
    border-left: 0;
  }

  .map-frame iframe {
    min-height: 340px;
  }

}

@media (max-width: 640px) {
  .brand {
    min-width: 170px;
    width: 170px;
  }

  .brand-logo {
    width: 170px;
    height: 64px;
  }

  .hero {
    min-height: calc(100vh - 154px);
    min-height: calc(100svh - 154px);
    background-position: center;
  }

  .hero-overlay {
    min-height: calc(100vh - 154px);
    min-height: calc(100svh - 154px);
    padding: 38px 18px;
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .filters,
  .inventory-grid,
  .metrics,
  .vehicle-form {
    grid-template-columns: 1fr;
  }

  .section-heading {
    flex-direction: column;
  }

  .section-heading .button {
    position: static;
  }

  .contact-band {
    align-items: stretch;
    flex-direction: column;
  }
}
