/* Kapsas brand palette */
:root {
  --blue: #073763;
  --burgundy: #741b47;
  --grey: #d9d9d9;
  --white: #ffffff;
  --black: #000000;
  --text: #1c1c1c;
  --radius: 10px;
  --shadow: 0 4px 14px rgba(0, 0, 0, .12);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--white); line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--burgundy); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--black); color: var(--white); padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
header.site { background: var(--white); color: var(--black); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--grey); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 44px; width: auto; }
nav.main a { color: var(--blue); text-decoration: none; margin-left: 1.25rem; font-weight: 600; }
nav.main a:hover { text-decoration: underline; color: var(--burgundy); }
.lang-box { display: flex; gap: .35rem; flex-wrap: wrap; }
.lang-btn { display: inline-flex; align-items: center; gap: .4rem; background: var(--white); color: var(--blue); border: 1px solid var(--grey); border-radius: 6px; padding: .3rem .6rem; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.lang-btn img { height: 16px; width: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.lang-btn:hover { border-color: var(--blue); }
.lang-btn[aria-pressed="true"] { background: var(--blue); color: var(--white); border-color: var(--blue); }
/* Hide the Google Translate top banner so it does not push the page down */
.goog-te-banner-frame, .skiptranslate iframe { display: none !important; }
body { top: 0 !important; }
.phone-link { color: var(--blue); font-weight: 600; text-decoration: none; }

/* Hero: first car photo with a dark blue overlay so the text stays readable */
.hero { background: linear-gradient(rgba(7, 55, 99, .55), rgba(0, 0, 0, .65)), url("../img/hero.jpg") center / cover no-repeat; color: var(--white); padding: 6rem 0; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 .5rem; line-height: 1.15; }
.hero p { font-size: 1.15rem; max-width: 640px; }
.btn { display: inline-block; background: var(--burgundy); color: var(--white); border: 0; padding: .75rem 1.4rem; border-radius: 6px; font-weight: 700; text-decoration: none; cursor: pointer; font-size: 1rem; }
.btn:hover { filter: brightness(1.12); }
.btn-outline { background: transparent; border: 2px solid var(--white); }
.btn-blue { background: var(--blue); }
.btn-small { padding: .4rem .8rem; font-size: .9rem; }
.btn-danger { background: var(--black); }

section.block { padding: 3.5rem 0; }
section.block.alt { background: var(--grey); }
h2.section-title { color: var(--blue); font-size: 2rem; margin: 0 0 1.5rem; }
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.card-box { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); border-top: 4px solid var(--burgundy); }
.card-box h3 { color: var(--blue); margin-top: 0; }

/* Catalogue */
.filters { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .9rem; align-items: end; margin-bottom: 1.5rem; }
.filters label { display: block; font-size: .85rem; font-weight: 600; color: var(--blue); margin-bottom: .25rem; }
.filters input, .filters select, .admin-form input, .admin-form select, .admin-form textarea { width: 100%; padding: .55rem .6rem; border: 1px solid #aaa; border-radius: 6px; font: inherit; background: var(--white); }
.filters .actions { display: flex; gap: .5rem; }
.result-count { color: #555; margin: .5rem 0 1rem; }
.cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.25rem; }
.car { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.car img { width: 100%; height: 190px; object-fit: cover; background: var(--grey); }
.car .body { padding: 1rem 1.1rem 1.25rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.car h3 { margin: 0; color: var(--blue); font-size: 1.15rem; }
.car .price { font-size: 1.4rem; font-weight: 800; color: var(--burgundy); }
.car .specs { font-size: .9rem; color: #444; }
.car .btn { margin-top: auto; text-align: center; }
.empty { padding: 2rem; text-align: center; background: var(--grey); border-radius: var(--radius); }

/* Car detail */
.detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
.gallery img.main { width: 100%; height: 420px; object-fit: cover; border-radius: var(--radius); background: var(--grey); }
.thumbs { display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
.thumbs img { width: 90px; height: 64px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.thumbs img.active { border-color: var(--burgundy); }
.video { position: relative; padding-top: 56.25%; margin-top: 1.5rem; border-radius: var(--radius); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.specs-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.specs-table td { padding: .55rem .4rem; border-bottom: 1px solid var(--grey); }
.specs-table td:first-child { color: #555; width: 45%; }
.price-big { font-size: 2rem; font-weight: 800; color: var(--burgundy); }
.note { font-size: .85rem; color: #555; }

/* Contact */
.contact-form { display: grid; gap: .75rem; max-width: 560px; }
.contact-form input, .contact-form textarea { padding: .65rem; border: 1px solid #999; border-radius: 6px; font: inherit; }

footer.site { background: var(--black); color: var(--grey); padding: 2rem 0; }
footer.site a { color: var(--white); }

@media (max-width: 800px) {
  .detail { grid-template-columns: 1fr; }
  nav.main { width: 100%; }
  nav.main a { margin: .5rem 1rem 0 0; display: inline-block; }
}
