/* ====== RESETE & BAZĂ ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f9f9fb;
  color: #222;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ====== CONTAINER PRINCIPAL ====== */
.container {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  max-width: 1300px;
  margin: auto;
  flex-wrap: wrap;
}

/* ====== STÂNGA (IMAGINI + DETALII) ====== */
.left-column {
  flex: 2;
  min-width: 300px;
}

.main-image {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.main-image img:hover {
  transform: scale(1.03);
  
}

.thumbnails {
  display: flex;
  gap: .5rem;
  margin-top: .8rem;
  overflow-x: auto;
  padding-bottom: .5rem;
}

.thumbnails img {
  width: 80px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  cursor: pointer;
  opacity: .7;
  transition: opacity .3s, transform .3s;
}
.thumbnails img.active,
.thumbnails img:hover {
  opacity: 1;
  transform: scale(1.05);
  border: 2px solid #007bff;
}

/* ====== TITLU ȘI SPECIFICAȚII ====== */
.car-title {
  font-size: 1.8rem;
  margin: 1rem 0 .5rem;
}

.key-specs {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 1.2rem;
  font-size: .95rem;
  color: #555;
}

.key-specs div i {
  color: #007bff;
  margin-right: .3rem;
}

.description {
  margin-top: 1.2rem;
  color: #444;
}

/* ====== SIDEBAR ====== */
.sidebar {
  flex: 1;
  min-width: 280px;
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  height: fit-content;
  position: sticky;
  top: 2rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  margin-bottom: .8rem;
}

.price {
  font-size: 2rem;
  font-weight: 700;
  color: #222;
  margin: .8rem 0;
}

.details-list {
  margin-bottom: 1.5rem;
}
.details-list div {
  padding: .3rem 0;
  border-bottom: 1px solid #eee;
}

/* ====== FORMULAR CONTACT ====== */
.contact-form label {
  display: block;
  margin-top: .8rem;
  font-weight: 500;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: .6rem .8rem;
  margin-top: .3rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color .3s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #007bff;
  outline: none;
}

.contact-form button {
  width: 100%;
  padding: .8rem;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  margin-top: 1rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background .3s;
}
.contact-form button:hover {
  background: #0056c7;
}

/* ===== SECȚIUNE ===== */
.similar-section {
  position: relative;
  margin: 4rem auto;
  padding: 0 1.5rem;
  max-width: 1300px;
}

.similar-section h2 {
  font-size: 1.9rem;
  text-align: center;
  margin-bottom: 1.8rem;
  color: #222;
  font-weight: 700;
}

/* ===== SLIDER ===== */
.similar-slider {
  overflow-x: hidden;
  position: relative;
}

.similar-track {
  display: flex;
  gap: 1.2rem;
  transition: transform 0.4s ease;
  scroll-behavior: smooth;
}

/* ===== CARD ===== */
.similar-card {
  background: #fff;
  border-radius: 14px;
  flex: 0 0 270px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}
.similar-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.similar-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

/* ===== INFO ===== */
.similar-card .info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.similar-card .title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #111;
  margin-bottom: .4rem;
  line-height: 1.3;
}

.similar-card .desc {
  font-size: .9rem;
  color: #555;
  line-height: 1.4;
  margin-bottom: .6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;     /* doar 2 rânduri */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== META ===== */
.similar-card .meta {
  font-size: .85rem;
  color: #666;
  display: flex;
  gap: .8rem;
  margin-bottom: 1rem;
}

/* ===== PREȚ + BUTON ===== */
.similar-card .bottom {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.similar-card .price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #007bff;
}

.details-btn {
  background: #007bff;
  color: white;
  padding: .45rem .9rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: .9rem;
  transition: background .3s;
}
.details-btn:hover {
  background: #005dc1;
}

/* ===== BUTOANE SLIDER ===== */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  color: #333;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  z-index: 10;
}
.slider-btn:hover {
  background: #007bff;
  color: white;
}
.slider-btn.prev { left: -10px; }
.slider-btn.next { right: -10px; }

/* ===== RESPONSIV ===== */
@media (max-width: 768px) {
  .similar-card {
    flex: 0 0 75%;
  }
  .similar-card img {
    height: 160px;
  }
  .slider-btn.prev { left: 5px; }
  .slider-btn.next { right: 5px; }
}
@media (max-width: 480px) {
  .similar-card {
    flex: 0 0 85%;
  }
  .similar-card .title {
    font-size: 1rem;
  }
}


/* end sectiune similare */

/* ====== LIGHTBOX ====== */
#lightbox {
  display: none;
  position: fixed;
  top:0; left:0; right:0; bottom:0;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
#lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255,255,255,0.2);
}
.lb-btn {
  position: absolute;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  user-select: none;
}
.lb-btn.prev { left: 5%; }
.lb-btn.next { right: 5%; }
.lb-btn.close {
  top: 5%;
  right: 5%;
  font-size: 3rem;
}

/* ====== RESPONSIVITATE ====== */
@media (max-width: 992px) {
  .container {
    flex-direction: column;
    padding: 1rem;
  }
  .sidebar {
    position: static;
    margin-top: 1.5rem;
  }
}

@media (max-width: 600px) {
  .car-title { font-size: 1.4rem; }
  .price { font-size: 1.5rem; }
  .thumbnails img {
    width: 60px;
    height: 45px;
  }
  .slider-btn {
    width: 35px;
    height: 35px;
    font-size: 1.4rem;
  }
}
