/*----------------CAR PAGE ------------------------*/
:root {
  --hero1: url("/images/car_hero.jpg") !important;
}

/* tighter hero wrapper */
.wrap--tight {
  padding: 48px 0 28px !important;
}

/* compact vertical rhythm for sections within container */
.section--compact {
  padding: 24px 0 !important;
}

/* reduce gap between gallery and sidebar */
.detail-grid--tight {
  gap: 16px !important;
}

/* cards & panels with smaller inner padding */
.card--tight {
  padding: 14px !important;
}

.cards--tight {
  gap: 16px !important;
}

.section-title--tight {
  margin-bottom: 12px !important;
}

.specs-grid .row {
  padding: 8px 0 !important;
}

.kv {
  gap: 6px !important;
}

.tags {
  gap: 8px !important;
}

.g-queue {
  margin-top: 8px !important;
}

@media (max-width:900px) {
  .wrap--tight {
    padding: 36px 0 22px !important;
  }

  .section--compact {
    padding: 18px 0 !important;
  }
}

.breadcrumbs {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
  font-size: .95rem;
}

.breadcrumbs .container {
  padding: 12px 0;
  color: var(--muted);
}

.breadcrumbs a {
  color: inherit;
}

.breadcrumbs a:hover {
  color: var(--text);
}

.detail-hero {
  padding: 28px 0 8px;
}

.detail-title {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.detail-title h1 {
  margin: 0;
  line-height: 1.1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 700;
  font-size: .9rem;
  color: #e9eef7;
  background: #1f2329;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 22px;
}

/* Gallery */
.gallery {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.gallery-main {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.gallery-main img {
  width: 100%;
  aspect-ratio: 16/9;
  height: auto;
  object-fit: cover;
  transition: transform .25s ease;
  display: block;
}

.g-side {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
  opacity: .85;
  transition: opacity .2s, background .2s;
}

.g-side.g-next {
  right: 0;
  left: auto;
  background: linear-gradient(270deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0));
}

.g-side.g-prev {
  left: 0;
  right: auto;
}

.g-side:hover {
  opacity: 1;
}

.g-side:focus-visible {
  box-shadow: 0 0 0 3px rgba(225, 31, 38, .35) inset;
}

.g-full {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(15, 17, 20, .65);
  color: #fff;
  font-weight: 700;
}

.g-full:focus-visible {
  box-shadow: 0 0 0 3px rgba(225, 31, 38, .35);
}

.g-loading {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: #1f2329;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: .9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.gallery-main.is-loading .g-loading {
  opacity: 1;
}

.g-queue {
  --queueN: 4;
  position: static;
  display: grid;
  grid-template-columns: repeat(var(--queueN), minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.gq-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16/10;
  background: #1f2329;
  padding: 0;
}

.gq-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gq-item:focus-visible {
  outline: 3px solid rgba(225, 31, 38, .35);
  outline-offset: 2px;
}

.side {
  position: relative;
  display: grid;
  gap: 14px;
  align-content: start;
}

.price {
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 800;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.specs.specs--tight {
  grid-template-columns: 1fr 1fr;
  font-size: .95rem;
  margin: 6px 0 4px;
}

.cta-col {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.note {
  color: var(--muted);
  font-size: .92rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.panel .cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.kv {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px;
}

.ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.ul li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

details.panel summary {
  cursor: pointer;
  list-style: none;
}

details.panel summary::-webkit-details-marker {
  display: none;
}

details.panel[open] summary {
  margin-bottom: 10px;
}

.cards .card .car-title {
  font-size: 1rem;
}

@media (max-width: 900px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .panel .cols {
    grid-template-columns: 1fr;
  }

  .kv {
    grid-template-columns: 1fr;
  }

  .g-side {
    width: 56px;
    font-size: 34px;
  }
}

@media (max-width: 640px) {
  .cta-col {
    grid-template-columns: 1fr;
  }

  .g-queue {
    gap: 8px;
    padding: 6px;
  }

  .gq-item {
    border-radius: 8px;
  }

  .g-side {
    width: 42px;
    font-size: 28px;
  }
}

/* Hero variant */
.hero-small {
  min-height: auto;
  padding: 0;
}

.hero-small {
  position: relative;
  isolation: isolate
}

.hero-small::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.55) 60%, rgba(0, 0, 0, 0.85) 100%), var(--hero1) center/cover no-repeat;
  filter: brightness(.95) contrast(1.05);
}

.container.wrap {
  padding: 88px 0 48px;
}

.hero-small h1 {
  font-size: clamp(28px, 3.6vw, 48px);
  margin: 12px 0 6px
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #e4e9f2
}

.meta>span {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .08);
  padding: 3px 5px;
  border-radius: 10px
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px
}

.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px
}

@media (max-width:700px) {
  .specs-grid {
    grid-template-columns: 1fr
  }
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed #424a56
}

.row small {
  color: var(--muted)
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px
}

.tag {
  background: #222831;
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: .95rem
}

.breadcrumbs {
  font-size: .95rem;
  color: var(--muted);
  padding: 8px 0;
  border: 0;
  background: none
}

.breadcrumbs a {
  color: #dfe6f1
}

/* When any .g-lightbox dialog is open, stop page scroll */
html:has(dialog.g-lightbox[open]) {
  overflow: hidden;
}


.g-lightbox{
  position: fixed;
  inset: 0;
  margin: 0; padding: 0; border: 0;
  width: 100vw; height: 100dvh;
  max-width: none; max-height: none;
  overflow: hidden;
  z-index: 9999;              /* above header */
  background: rgba(0,0,0,.6);
}
.g-lightbox::backdrop{ background: transparent; } /* avoid double tint when modal */

.g-l-wrap{
  display: grid; place-items: center;
  width: 100%; height: 100%;
}

.g-lightbox img{
  max-width: 80vw; max-height: 80vh;
  object-fit: contain;
}


.g-l-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #1f2329;
  color: #fff;
  font-size: 22px;
}

.g-l-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(15, 17, 20, .65);
  color: #fff;
  font-size: 28px;
}

.g-l-prev {
  left: 12px;
}

.g-l-next {
  right: 12px;
}



/* === Vehicle detail (sidebar) price override === */
.detail-grid .side .price{
  /* override the global stack/right-align from style.css */
  margin: 0 0 8px 0;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: baseline;
  justify-content: flex-start;
  gap: 6px 12px;
  line-height: 1.05;
}

/* Big, bold, primary number – vždy na vlastním řádku pod starou cenou / badge */
.detail-grid .side .price .new{
  order: 2;                 /* až po .old + .badge */
  flex-basis: 100%;         /* nový řádek přes celou šířku */
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);       /* stays readable on dark panel */
}

/* Stará cena na prvním řádku */
.detail-grid .side .price .old{
  order: 1;                 /* první v pořadí */
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 600;
  color: var(--muted);
  text-decoration: line-through;
  align-self: center;
}

/* Discount badge: pill, brand-colored – hned vedle staré ceny */
.detail-grid .side .price .badge{
  order: 1;                 /* na stejném řádku jako .old */
  align-self: center;
  padding: 2px 10px;
  border-radius: 999px;
  border-color: var(--accent-700);
  background: var(--accent-700);
  color: #fff;
  font-size: .85rem;
  line-height: 1.3;
}

/* Text pod cenou (DPH atd.) – vždy další řádky pod cenou */
.detail-grid .side .price .muted{
  order: 3;
  flex-basis: 100%;
  margin-top: 2px;
  font-size: .95rem;
  color: var(--muted);
}

/* Slightly smaller on narrow screens */
@media (max-width: 640px){
  .detail-grid .side .price .new{
    font-size: clamp(24px, 6vw, 32px);
  }
  .detail-grid .side .price .old{
    font-size: .9rem;
  }
  .detail-grid .side .price .badge{
    font-size: .8rem;
  }
}
