@font-face {
  font-family: "Nissan Brand";
  src: url("../../fonts/nissanbrand-light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "Nissan Brand";
  src: url("../../fonts/nissanbrand-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Nissan Brand";
  src: url("../../fonts/nissanbrand-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
}

:root {
  --font-nissan: "Nissan Brand", sans-serif;
}

body {
  font-family: var(--font-nissan);
  margin: 0;
}

/* Grid layout */
#vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  align-items: stretch;
  /* makes all cards equal height */
}

/* Card */
#vehicle-grid>div {
  display: flex;
  flex-direction: column;
  height: 100%;
  /* ensures stretch works */
}

/* Title section */
.vehicle-title {
  min-height: 2.5rem;
  /* lock consistent height */
  display: flex;
  align-items: center;
  /* center shorter titles vertically */
  font-size: 1rem;
  /* text-base */
  font-weight: 700;
  /* bold */
  text-transform: uppercase;
}

/* Accordion chevron rotation */
.accordion-header .chevron {
  transition: transform 0.2s ease-in-out;
}

.accordion-header .chevron.rotate-180 {
  transform: rotate(180deg);
}

/* Custom Single-Track Range Slider Styles */
.custom-range-slider {
  user-select: none;
  /* Prevent text selection during drag */
}

.slider-track {
  height: 4px;
}

.slider-range {
  height: 4px;
}

.slider-thumb-min,
.slider-thumb-max {
  box-shadow: 0 0 0 2px white, 0 0 0 3px black;
  transition: box-shadow 0.2s;
}

.slider-thumb-min:hover,
.slider-thumb-max:hover {
  box-shadow: 0 0 0 3px white, 0 0 0 4px black;
}

/* Custom Dropdown Chevron */
#sort-dropdown-button .chevron {
  transition: transform 0.2s ease-in-out;
}

#sort-dropdown-button.open .chevron {
  transform: rotate(180deg);
}

/* FAQ Accordion on Details Page */
.faq-header .chevron {
  transition: transform 0.2s ease-in-out;
}

.faq-header.open .chevron {
  transform: rotate(180deg);
}

:root {
  --font-nissan: "Nissan Brand", sans-serif;
  --radius: 0.625rem;
  --background: #efefef;
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.53 0.01 236);
  --secondary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.97 0 0);
  --accent-foreground: oklch(0.205 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.807 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);
  --accent: #111;
  --muted: #bdbdbd;
  --text: #111;
  --label: #676767;
}

.dark {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.205 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.205 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.922 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.704 0.191 22.216);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.556 0 0);
}

body {
  font-family: var(--font-nissan);
  background-color: var(--background);
  color: var(--foreground);
  overflow-x: hidden;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Opera */
}

/* Compare Bar Styles */
#compare-bar .slot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
}

#compare-bar .slot.hidden {
  display: none;
}

#compare-bar .slot img {
  width: 100%;
  height: 3rem;
  object-fit: contain;
}

#compare-action-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Compare Modal Styles */
#compare-table th.hidden,
#compare-table td.hidden {
  display: none;
}

.psv-navbar,
.cloudimage-360-view-360-icon {
  display: none !important;
}

/* .psv-container{
  cursor: grab !important;
} */
@media screen and (min-width: 1024px) {
  dialog.car-modal {
    width: 90%;
    position: fixed;
    margin: 0px 0px 0px auto;
  }
}

dialog {
  min-height: 100vh;
  padding: 20px;
  border: none;
  width: 100%;
  max-width: initial;
  min-width: initial;
  position: fixed;
  inset: 0px;
  height: 100%;
  max-height: calc(100% - 2em - 6px);
  overflow-y: auto;
  background-color: #c0c0c0;
}

dialog.car-modal[open].open {
  transform: translateX(0);
}

dialog.car-modal::backdrop {
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

dialog.car-modal[open].open::backdrop {
  opacity: 1;
}

/* Reset some defaults */
body,
h1,
h2,
h3,
p,
label {
  margin: 0;
  padding: 0;
  font-family: var(--font-nissan);

}

/* Inputs & Selects */
input,
select {
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Disclaimer */
.disclaimer,
.privacy-disclaimer {
  font-family: var(--font-nissan);
  font-weight: 300;
  font-style: Regular;
  font-size: 12px;
  line-height: 160%;
  letter-spacing: 2px;
  vertical-align: middle;
}

.form-fields-disclaimer {
  font-weight: 400;
  font-style: Regular;
  font-size: 14px;
  line-height: 160%;
  letter-spacing: 2px;
  vertical-align: middle;
}

.disclaimer-wrapper {
  padding: 160px 0px 0px;
}

.disclaimer-section {
  font-weight: 400;
  font-style: Regular;
  font-size: 12px;
  line-height: 160%;
  letter-spacing: 2px;
  vertical-align: middle;
  text-transform: capitalize;
}

.order-page-disclaimer {
  padding: 40px 0px 94px;
}

/* Consent section */
.consent-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tooltip-wrapper {
  position: relative;
  display: inline-block;
}

/* Tooltip box styling */
.tooltip-box {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 130%;
  /* show above icon */
  left: 50%;
  transform: translateX(-50%);
  background: white;
  color: black;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  max-width: min(90vw, 350px);
  /* shrink on small screens */
  width: max-content;
  white-space: normal;
  font-size: 14px;
  line-height: 1.4;
  z-index: 100;
  transition: opacity 0.2s ease-in-out;
  letter-spacing: 1.5px;
  font-weight: 200;
}

/* Tooltip arrow */
.tooltip-arrow {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid white;
}

/* Close button */
.tooltip-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: bold;
  color: black;
  cursor: pointer;
}

.tooltip-wrapper:hover .tooltip-box {
  visibility: visible;
  opacity: 1;
}

.tooltip-box.show {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.18s ease;
}

.form-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  position: relative;
}

.form-item label {
  font-weight: 500;
  color: black;
}

.form-item.error label {
  color: #e00034;
}

.form-item input {
  width: 100%;
  border-radius: 4px;
  border: 1px solid black;
  background: transparent;
  padding: 11px 12px;
  color: black;
  font-weight: 100;
  font-size: 16px;
  letter-spacing: 0.8px;
  line-height: 26px;
}

.form-item select {
  appearance: none;
  cursor: pointer;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  user-select: none;
  border: 1px solid black;
  box-sizing: border-box;
  border-radius: 4px;
  padding: 12px 45px 12px 11px;
  background-color: transparent;
  font-weight: 100;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'%3E%3Cpath d='M511.573 805.973l-445.227-445.141c-33.323-33.323-33.323-87.339 0-120.704 33.323-33.323 87.339-33.323 120.704 0l324.565 324.523 324.48-324.48c33.323-33.323 87.339-33.323 120.661 0s33.323 87.339 0 120.661l-445.184 445.141z'/%3E%3C/svg%3E") right 12px center / 20px no-repeat transparent;
}


.form-item.error input,
.form-item.error select {
  border-color: #e00034;
}

.form-error {
  font-size: 14px;
  line-height: 20px;
  color: black;
  background-color: #f5e7ea;
  border-radius: 4px;
  padding: 0.25rem 0.75rem;
  width: 100%;
  display: flex;
  padding: 16px 20px 16px 12px;
  gap: 12px;
  -webkit-box-align: baseline;
  align-items: baseline;
  margin-top: 4px;
  display: none;
  align-items: center;
  font-weight: 100;
}

.form-item.error .form-error {
  display: flex;
}

.form-error .cancel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
}

.showroom-option {
  display: block;
  padding: 0.5rem 0;
  cursor: pointer;
}

.showroom-option input[type="radio"] {
  display: none;
}

.showroom-option label {
  display: block;
  padding: 0.5rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
}

.showroom-option input[type="radio"]:checked+label {
  border-color: black;
  background-color: #f0f0f0;
}

.dealer-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dealer {
  padding: 16px 16px;
  border: 1px solid #c0c0c0;
  border-radius: 4px;
  cursor: pointer;
}

.dealer-info {
  flex: 1 1 0px;
}

.dealer-info p {
  margin: 0;
}

.dealer-info .dealer-name {
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.8px;
  line-height: 26px;
  margin-bottom: 8px;
}

.dealer-info .dealer-address {
  font-size: 14px;
  font-weight: 300;
  line-height: 16px;
  letter-spacing: 0.8px;
}

.dealer:hover {
  background-color: black;
  color: white;
}

.stepper {
  margin: 0 auto;
  padding: 20px 0;
}

.steps {
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  width: 100%;
}

.step {
  display: flex;
  align-items: flex-start;
  position: relative;
  text-align: left;
}

/* connector line */
.step::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 35%;
  width: calc(100vw / 3);
  height: 2px;
  background: var(--muted);
  z-index: 0;
}

/* Mobile / small screens (320px – 639px) */
@media (min-width: 320px) and (max-width: 639px) {
  .step::after {
    left: 55%;
    top: 50%;
    width: calc(100vw / 3);
  }
}

/* Medium screens (640px – 1023px) */
@media (min-width: 640px) and (max-width: 1023px) {
  .step::after {
    left: 100%;
  }
}

/* Large screens (1024px and above) */
@media (min-width: 1024px) and (max-width: 1279px) {
  .step::after {
    width: calc(100vw / 4);
  }
}

@media (min-width: 1280px) and (max-width: 2559px) {
  .step::after {
    width: calc(100vw / 3);
  }
}

@media (min-width: 2560px) {
  .step::after {
    width: 28vw;
  }
}

/* hide connector after the last step */
.step:last-child::after {
  display: none;
}

.step.first-active::after {
  background: linear-gradient(to left, var(--muted) 48%, #000111 48%);
}

.step.is-complete::after {
  background: linear-gradient(to left, #000111 48%, #000111 48%);
}

.step.second-active::after {
  background: linear-gradient(to left, var(--muted) 48%, #000111 48%);
}

/* icon */
.icon {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--muted);
  border: 2px solid var(--muted);
  z-index: 1;
}

.icon::after {
  content: "";
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--muted);
}

.step.is-active .icon,
.step.is-complete .icon {
  background: #fff;
  border-color: var(--accent);
}

.step.is-active .icon::after,
.step.is-complete .icon::after {
  background: var(--accent);
}

.step-right {
  margin-left: 10px;
  display: flex;
  flex-direction: column;
}

.step-label {
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 6px;
}

.title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.desc {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 300;
}

/* =============================================
   Color Swatches Styles
   ============================================= */
.color-swatches-container {
  padding: 0.5rem 0;
}

.color-swatch-btn {
  position: relative;
  border-radius: 9999px;
  cursor: pointer;
  flex-shrink: 0;
}

.color-swatch-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.color-swatch-btn:focus {
  outline: none;
}

.color-swatch-btn.active,
.color-swatch-btn[class*="ring-black"] {
  transform: scale(1.15);
}

/* Reserved color swatch overlay */
.color-swatch-btn[data-status="reserved"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 9999px;
}

/* Color count label */
.color-count-label {
  font-size: 0.65rem;
  color: #6b7280;
}

/* Vehicle card wrapper for grouped vehicles */
.vehicle-card-wrapper {
  transition: box-shadow 0.2s ease-in-out;
}

.vehicle-card-wrapper:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Vehicle thumbnail transition */
.vehicle-thumbnail {
  transition: opacity 0.3s ease-in-out;
}

/* Status badge transitions */
.vehicle-status-badge svg {
  transition: color 0.2s ease-in-out;
}

.vehicle-status-badge .status-text {
  transition: color 0.2s ease-in-out;
}

/* Price and reservation fee transitions */
.vehicle-price,
.reservation-amount {
  transition: all 0.2s ease-in-out;
}

/* Explore button transitions */
.explore-btn {
  transition: all 0.2s ease-in-out;
}

/* Reserved vehicle overlay indicator */
.vehicle-card-wrapper[data-status="reserved"] {
  position: relative;
}

.vehicle-card-wrapper[data-status="reserved"]::after {
  content: 'RESERVED';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #f59e0b;
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  letter-spacing: 0.05em;
}

/* =============================================
   Detail Page Color Variant Styles
   ============================================= */
.color-variant-btn {
  position: relative;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.color-variant-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.color-variant-btn:focus {
  outline: none;
}

#selected-color-display {
  transition: background-color 0.3s ease, color 0.3s ease;
}

#selected-color-swatch {
  transition: background-color 0.3s ease;
}

/* Color selection animation */
@keyframes colorPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.color-variant-btn.animate-pulse-once {
  animation: colorPulse 0.3s ease-in-out;
}