/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* ── Dynamic feature badges (single vehicle page) ── */
.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #f5f5f5;
  border-radius: 999px;
  font-size: 13px;
  color: #111;
  line-height: 1.4;
}

/* ── Extra specs grid (volume, charge utile, dim ext) ── */
.specs-extra-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.spec-card-extra {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: #f5f5f5;
  border-radius: 12px;
}
.spec-card-icon {
  font-size: 20px;
  line-height: 1;
}
.spec-card-label {
  font-size: 12px;
  color: #999;
}
.spec-card-value {
  font-size: 15px;
  font-weight: 600;
  color: #111;
}

@media (max-width: 768px) {
  .specs-extra-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  .specs-extra-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Vehicle filter UI (page Nos véhicules) ── */

/* Search input replaces static placeholder */
.vrc-search-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--bricks-color-color-black, #111);
  font-family: inherit;
  padding: 0;
}
.vrc-search-input::placeholder {
  color: var(--bricks-color-color-grey-400, #999);
}

/* Category pills – pointer already set via JS */
.category-pill {
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  user-select: none;
}
/* Active (selected) category pill — multi-select supported */
.category-pill-active {
  background-color: var(--bricks-color-color-primary, #d4a745) !important;
  border-color: var(--bricks-color-color-primary, #d4a745) !important;
  color: var(--bricks-color-color-black, #111) !important;
}

/* ── Card spec pills (boîte / m³ / permis / places) ── */
.vehicle-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.vrc-spec-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bricks-color-color-light-grey, #f5f5f5);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--bricks-color-color-grey-500, #444);
  white-space: nowrap;
}
.vrc-spec-pill svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--bricks-color-color-primary, #d4a745);
}

/* ── Card image carousel (gallery, fallback featured) ── */
.vcard-carousel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  /* Deliver horizontal gestures to the swipe JS; keep vertical page scroll. */
  touch-action: pan-y;
  cursor: grab;
}
.vcard-carousel:active { cursor: grabbing; }
.vcard-carousel.is-single { cursor: default; touch-action: auto; }
.vcard-track {
  position: absolute;
  inset: 0;
  display: block;
}
.vcard-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
  /* Prevent native image-drag ghost and text selection while swiping. */
  user-select: none;
  -webkit-user-drag: none;
}
.vcard-slide.active { opacity: 1; }
.vcard-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.vcard-nav svg { width: 15px; height: 15px; }
.vehicle-image-wrapper:hover .vcard-nav,
.vcard-carousel:hover .vcard-nav { opacity: 1; }
.vcard-prev { left: 8px; }
.vcard-next { right: 8px; }
.vcard-nav:hover { background: #fff; }
.vcard-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 3;
}
.vcard-dot {
  appearance: none;
  border: 0;
  padding: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.2s ease;
}
.vcard-dot.active { background: var(--bricks-color-color-primary, #F5C800); }
@media (hover: none) {
  .vcard-nav { opacity: 1; }
}

/* Card category badge: links to the filtered catalog (multiple terms spaced) */
.category-badge a + a { margin-left: 8px; }

/* Sort dropdown menu */
.vrc-sort-trigger {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: inherit;
}
.vrc-sort-trigger:focus-visible,
.vrc-sort-item:focus-visible,
.vcard-dot:focus-visible {
  outline: 3px solid var(--bricks-color-color-primary, #d4a745);
  outline-offset: 3px;
}
.vrc-sort-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--bricks-color-color-grey-200, #e5e5e5);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  z-index: 100;
  overflow: hidden;
}
.vrc-sort-menu.open {
  display: block;
}
.vrc-sort-item {
  appearance: none;
  border: 0;
  width: 100%;
  background: #fff;
  color: inherit;
  text-align: left;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s;
}
.vrc-sort-item:hover {
  background: var(--bricks-color-color-light-grey, #f5f5f5);
}
.vrc-sort-item.active {
  font-weight: 600;
  color: var(--bricks-color-color-primary, #d4a745);
}
