* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--light-gray);
  color: #111;
  line-height: 1.6;
}

.card {
  background: #f8f8f8; /* 👈 soft gray instead of white */
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;

  border: 1px solid rgba(0,0,0,0.05);

  transition: all 0.25s ease;
  position: relative;
}

@media (max-width: 600px) {
  .car-image {
    height: 180px;
  }

  .card-image {
    height: 180px;
  }

  .card-content,
  .car-content {
    padding: 12px;
  }

  .card-content h3,
  .car-content h3 {
    font-size: 15px;
  }
}

@media (max-width: 600px) {
  button {
    min-height: 42px;
    font-size: 14px;
  }

  .car-actions {
    flex-direction: column;
  }

  .action-buttons {
    flex-wrap: wrap;
    margin-right: 0; /* remove your desktop shift */
  }
}

.hero-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

/* CONTAINER */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

.mycars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

button {
  border: none;
  outline: none;
  font-family: inherit;
}

/* ===== CLEAN BUTTON SYSTEM ===== */
.action-buttons {
  display: flex;
  gap: 12px;
  align-items: center;

  margin-left: auto;   /* keeps it right */
  margin-right: 110px;  /* 👈 THIS moves it left */
}

.action-buttons button {
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;

  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.action-buttons button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding-top: 20px;
}

@media (max-width: 600px) {
  .cars-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .mycars-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.car-card {
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  transition: 0.25s;
}

.car-card:hover {
  transform: translateY(-5px);
  background: #1a1a1a;
}

.car-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.car-content {
  padding: 14px;
}

.car-content h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.car-actions {
  display: flex;
  gap: 10px;
}

.approve-btn {
  flex: 1;
  background: #16a34a;
  border: none;
  padding: 10px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
}

.reject-btn {
  flex: 1;
  background: #dc2626;
  border: none;
  padding: 10px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
}

/* Favorite */
.btn-fav {
  background: black;
  color: white;
  border: 1px solid #ddd;
}

.header-buttons button {
  white-space: nowrap;   /* 🔥 prevents line break */
}

.btn-edit {
  background: black;
  color: white;
}

.btn-fav:hover {
  background: #555;
}

.btn-edit:hover {
  background: var(--dark-gray);
}

.btn-delete {
  background: black;
  color: white;
}

.btn-delete:hover {
  background: #c62828;
}

.back-wrapper {
  margin-top: 20px;
  margin-bottom: 15px;
}

/* BACK BUTTON */
.back-btn {
  background: #111;
  color: white;
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
}

/* THUMBNAILS */
.thumb {
  width: 90px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: 0.2s;
  flex: 0 0 auto;
}

.thumb.active {
  border: 3px solid #00c853;
  box-shadow: 0 0 0 2px rgba(0,200,83,0.25);
}

#thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  overflow-x: auto;
  overflow-y: hidden;
}

#thumbnails::-webkit-scrollbar {
  display: none;
}

/* ===== DESCRIPTION ===== */
.description-section {
  margin-top: 40px;
  padding: 25px 30px;
  border-top: 1px solid rgba(0,0,0,0.05);

  width: 93%;
  max-width: 93%;

  background: #f9f9f9;
  border-radius: 14px;
}

.description-section h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.description-section p {
  font-size: 15px;
  line-height: 1.7;
  color: #444;

  width: 100%;
  max-width: 100%;

  word-break: break-word;
  overflow-wrap: break-word;
}

/* ===== SPECS GRID ===== */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;

  margin-top: 30px;

  padding: 22px 28px; /* match description feel */

  background: #f8f8f8;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.05);

  width: 93%; /* IMPORTANT */
}

.specs-grid div {
  display: flex;
  flex-direction: column;
  gap: 2px; /* 👈 clean spacing between label/value */
}

.car-header {
  margin-top: 5px;   /* space from image */
  margin-bottom: 5px;

  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.specs-grid strong {
  font-size: 10px;
  letter-spacing: 0.5px;
  color: #888;
  margin-bottom: 2px; /* 👈 tighter */
}

.specs-grid span {
  font-size: 18px;
  font-weight: 500;
  color: #111;
}

/* ===== GALLERY LAYOUT (LEFT MAIN / RIGHT THUMBS) ===== */

.gallery-wrapper {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

/* MAIN IMAGE */
.main-image-container {
  flex: 1;
}

#mainImage {
  width: 100%;
  height: 480px;

  object-fit: contain; /* keeps quality */
  background: #f3f3f3;

  border-radius: 16px;
  cursor: pointer;
}

/* VERTICAL THUMBNAILS */
.thumbs-vertical {
  display: flex;
  flex-direction: column;
  gap: 10px;

  max-height: 480px;
  overflow: hidden;

  padding-right: 4px;
}

/* SCROLLBAR CLEAN */
.thumbs-vertical::-webkit-scrollbar {
  width: 6px;
}

.thumbs-vertical::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 10px;
}

/* THUMB STYLE UPGRADE */
.thumb {
  width: 100px;
  height: 80px;

  object-fit: cover;
  border-radius: 10px;

  cursor: pointer;
  border: 2px solid transparent;

  transition: all 0.2s ease;
}

.thumb:hover {
  transform: scale(1.05);
}

/* ACTIVE THUMB (STRONGER PREMIUM LOOK) */
.thumb.active {
  border: 3px solid #00c853;
  box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.2);
}

/* ===== THUMBNAIL CONTAINER WITH ARROWS ===== */

.thumbs-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;

  position: relative;
  transform: translateY(-25px); /* 🔥 THIS LIFTS EVERYTHING */
}

/* SCROLL AREA */
.thumbs-vertical {
  display: flex;
  flex-direction: column;
  gap: 10px;

  max-height: 420px;
  overflow: hidden; /* IMPORTANT */
}

/* ARROWS */
.thumb-arrow {
  width: 40px;
  height: 40px;

  border: none;
  border-radius: 50%;

  background: #111;
  color: #fff;

  cursor: pointer;
  font-size: 16px;

  transition: all 0.2s ease;
}

.thumb-arrow:hover {
  background: #333;
  transform: scale(1.1);
}

/* DISABLED STATE (optional later) */
.thumb-arrow.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* ===== ADD PAGE MODERN UI ===== */

.form-container {
  max-width: 1000px;
  margin: 80px auto;
  background: #111;
  padding: 30px;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.form-container h1 {
  text-align: center;
  color: white;
  margin-bottom: 25px;
}

/* GRID */
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

@media (max-width: 700px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-container {
    margin: 60px 12px;
    padding: 20px;
  }
}

@media (max-width: 600px) {
  .hero-img {
    height: 220px;
    border-radius: 12px;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 12px;
  }
}

/* INPUTS */
.car-form input,
.car-form select,
.car-form textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #1c1c1c;
  color: white;
  font-size: 14px;
  transition: 0.2s;
}

.car-form input:focus,
.car-form select:focus,
.car-form textarea:focus {
  background: #222;
  box-shadow: 0 0 0 1px #00c853;
}

/* TEXTAREA */
.car-form textarea {
  margin-top: 10px;
  min-height: 120px;
}

/* UPLOAD */
.upload-box {
  margin-top: 20px;
  color: #aaa;
}

/* BUTTON */
.submit-btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: #00c853;
  border: none;
  border-radius: 999px;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: 0.2s;
}

.submit-btn:hover {
  background: #00b248;
}

/* ===== IMAGE PREVIEW ===== */

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.preview-item {
  position: relative;
}

.preview-item img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
}

.remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-size: 12px;
}

/* MAIN BUTTON */
.set-main-btn {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: #222;
  color: white;
  border: none;
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.set-main-btn:hover {
  background: #00c853;
}

/* ===== MY CARS MODERN CARD ===== */

.car-card {
  display: flex;
  flex-direction: column;
  background: #f6f6f6;
  border-radius: 16px;
  overflow: hidden;

  transition: all 0.25s ease;
}

.car-card:hover {
  transform: translateY(-6px);
  background: #ededed;
}

/* IMAGE FIX (IMPORTANT) */
.card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 🔥 fixes stretched images */
}

/* CONTENT */
.card-content {
  padding: 14px;
}

.card-content h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.card-year {
  font-size: 12px;
  color: #777;
}

/* PRICE */
.card-price {
  margin-top: 8px;
  font-weight: 600;
  font-size: 16px;
}

/* STATUS */
.card-status {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

/* STATUS COLORS */
.card-status.approved {
  color: #00c853;
}

.card-status.pending {
  color: #ff9800;
}

.card-status.rejected {
  color: #e53935;
}

@media (max-width: 600px) {
  .specs-grid {
    grid-template-columns: 1fr;
    padding: 16px;
    width: 100%;
  }
}

@media (max-width: 700px) {
  .gallery-wrapper {
    flex-direction: column;
  }

  #mainImage {
    height: 260px;
  }

  .thumbs-container {
    flex-direction: row;
    transform: none;
  }

  .thumbs-vertical {
    flex-direction: row;
    overflow-x: auto;
    max-height: none;
  }

  .thumb {
    width: 80px;
    height: 60px;
  }
}

