.ca-auctions-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* Responzivní grid pro různé velikosti obrazovek */
@media (min-width: 1200px) {
  .ca-auctions-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .ca-auctions-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  .ca-auctions-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  .ca-auctions-container {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 15px;
  }
}

.ca-auction-item {
  display: flex;
  flex-direction: column;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  height: 100%;
}

.ca-auction-item:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.ca-auction-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.ca-auction-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ca-auction-item:hover .ca-auction-image img {
  transform: scale(1.05);
}

.ca-auction-details {
  flex: 1;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

/* Řádek 1: Header s názvem */
.ca-auction-header {
  margin-bottom: 10px;
}

.ca-auction-title {
  font-size: 1.2em;
  font-weight: bold;
  margin: 0;
  line-height: 1.3;
}

.ca-auction-title a {
  color: #333;
  text-decoration: none;
  display: block;
}

.ca-auction-title a:hover {
  color: #0073aa;
  text-decoration: underline;
}

/* Řádek 2: Cena */
.ca-auction-price-row {
  margin-bottom: 6px;
}

.ca-auction-price {
  font-size: 1.3em;
  font-weight: bold;
  color: #e74c3c;
  line-height: 1.2;
}

/* Řádek 3: Cena Kup teď */
.ca-auction-fast-buy-row {
  margin-bottom: 6px;
}

.ca-auction-fast-buy {
  font-size: 1.1em;
  color: #27ae60;
  font-weight: bold;
  line-height: 1.2;
}

.ca-auction-fast-buy-placeholder {
  display: block;
  height: 1.1em;
  visibility: hidden;
}

/* Řádek 4: Číslo aukce + logo */
.ca-auction-lot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.9em;
  color: #666;
  line-height: 1.2;
}

.ca-auction-lot-number {
  font-weight: 500;
}

.ca-auction-provider-logo {
  margin-left: 10px;
  flex-shrink: 0;
}

.ca-provider-logo {
  height: 18px;
  width: auto;
  max-width: 60px;
}

/* Řádek 5: VIN */
.ca-auction-vin-row {
  margin-bottom: 6px;
}

.ca-auction-vin {
  font-size: 0.9em;
  color: #666;
  font-weight: 500;
  line-height: 1.2;
}

/* Řádky 6-10: Technické specifikace */
.ca-auction-engine-row,
.ca-auction-transmission-row,
.ca-auction-drive-row,
.ca-auction-odometer-row,
.ca-auction-fuel-row {
  margin-bottom: 5px;
}

.ca-auction-engine,
.ca-auction-transmission,
.ca-auction-drive,
.ca-auction-odometer,
.ca-auction-fuel {
  font-size: 0.85em;
  color: #555;
  display: flex;
  align-items: center;
  line-height: 1.2;
}

.ca-auction-engine i,
.ca-auction-transmission i,
.ca-auction-drive i,
.ca-auction-odometer i,
.ca-auction-fuel i {
  margin-right: 5px;
  color: #666;
  font-size: 0.9em;
}

/* Řádky 11-15: Další informace */
.ca-auction-location-row,
.ca-auction-damage-row,
.ca-auction-estimated-price-row,
.ca-auction-status-row,
.ca-auction-time-row {
  margin-bottom: 5px;
}

.ca-auction-location,
.ca-auction-damage,
.ca-auction-estimated-price {
  font-size: 0.85em;
  color: #666;
  display: flex;
  align-items: center;
  line-height: 1.2;
}

.ca-auction-location i,
.ca-auction-damage i,
.ca-auction-estimated-price i {
  margin-right: 5px;
  font-size: 0.9em;
}

.ca-auction-status {
  font-size: 0.85em;
  color: #666;
  padding: 3px 8px;
  border-radius: 12px;
  background-color: #f0f0f0;
  display: inline-block;
  line-height: 1.2;
}

.ca-auction-status.stationary {
  color: #f39c12;
  background-color: #fef9e7;
}

.ca-auction-status.run-drive {
  color: #27ae60;
  background-color: #eafaf1;
}

.ca-auction-time {
  font-size: 0.85em;
  color: #666;
  display: flex;
  align-items: center;
  line-height: 1.2;
}

.ca-auction-time i {
  margin-right: 5px;
  font-size: 0.9em;
}

.ca-auction-ended {
  color: #e74c3c;
}

.ca-auction-button-container {
  margin-top: 15px;
  text-align: center;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.ca-auction-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #0073aa;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.9em;
  transition: all 0.3s ease;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.ca-auction-button:hover {
  background-color: #005177;
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
}

/* Detail stránka */
.ca-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.ca-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.ca-detail-title {
  font-size: 1.8em;
  font-weight: bold;
  margin: 0;
}

.ca-detail-price-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.ca-detail-price {
  font-size: 1.6em;
  font-weight: bold;
  color: #e74c3c;
}

.ca-detail-provider-logo {
  margin-top: 5px;
}

.ca-detail-provider-logo img {
  height: 20px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
}

.ca-detail-auction-info {
  display: flex;
  margin-bottom: 20px;
  background-color: #f9f9f9;
  padding: 10px;
  border-radius: 5px;
}

.ca-detail-lot-number {
  margin-right: 30px;
}

/* Přepracovaná galerie */
.ca-detail-gallery {
  margin-bottom: 30px;
  position: relative;
}

/* Kontejner pro hlavní obrázek a navigační šipky */
.ca-detail-main-image-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  background-color: #f5f5f5;
  border-radius: 5px;
  overflow: hidden;
}

/* Hlavní obrázek */
.ca-detail-main-image {
  width: 100%;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ca-detail-main-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Navigační šipky u hlavního obrázku */
.ca-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  z-index: 10;
}

.ca-gallery-prev {
  left: 10px;
}

.ca-gallery-next {
  right: 10px;
}

.ca-gallery-nav:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* Miniatury */
.ca-detail-thumbnails {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 10px;
}

.ca-detail-thumbnail {
  width: 100px;
  height: 70px;
  overflow: hidden;
  border-radius: 3px;
  cursor: pointer;
  background-color: #f5f5f5;
  flex-shrink: 0;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.ca-detail-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.ca-detail-thumbnail.active {
  border-color: #0073aa;
}

/* Lightbox */
.ca-lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.9);
}

.ca-lightbox-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ca-lightbox-close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: white;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
}

.ca-lightbox-image-container {
  position: relative;
  width: 100%;
  height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ca-lightbox-image-container img {
  max-width: 90%;
  max-height: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.ca-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  z-index: 10000;
}

.ca-lightbox-prev {
  left: 20px;
}

.ca-lightbox-next {
  right: 20px;
}

.ca-lightbox-nav:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.ca-lightbox-caption {
  color: white;
  padding: 10px;
  text-align: center;
  margin-top: 10px;
}

.ca-detail-info {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.ca-detail-section {
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  padding: 15px;
  background-color: #fff;
}

.ca-detail-section-title {
  font-size: 1.2em;
  font-weight: bold;
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

/* Nový styl pro zobrazení specifikací v řádcích */
.ca-detail-specs-inline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ca-detail-spec {
  display: flex;
  flex-direction: column;
  padding: 5px 0;
  border-bottom: 1px solid #f5f5f5;
}

.ca-detail-spec:last-child {
  border-bottom: none;
}

.ca-detail-spec-label {
  font-size: 0.9em;
  color: #666;
  margin-right: 5px;
}

.ca-detail-spec-value {
  font-weight: bold;
}

.ca-detail-description {
  margin-top: 20px;
}

/* Styly pro odkaz na kontrolu VIN */
.ca-vin-check-link {
  display: inline-flex;
  align-items: center;
  margin-top: 5px;
  margin-left: 0;
  padding: 3px 8px;
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  font-size: 0.85em;
  transition: all 0.2s ease;
}

.ca-vin-check-link:hover {
  background-color: #e9e9e9;
  border-color: #ccc;
  text-decoration: none;
}

.ca-carfax-logo {
  height: 14px;
  width: auto;
  max-width: 60px;
  margin-right: 5px;
  vertical-align: middle;
}

/* Responzivní design pro karty */
@media (max-width: 768px) {
  .ca-auction-item {
    margin-bottom: 15px;
  }

  .ca-auction-title {
    font-size: 1.1em;
  }

  .ca-auction-price {
    font-size: 1.2em;
  }

  .ca-auction-fast-buy {
    font-size: 1em;
  }

  .ca-auction-lot-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .ca-auction-provider-logo {
    margin-left: 0;
  }

  .ca-detail-main-image {
    height: 300px;
  }

  .ca-detail-info {
    grid-template-columns: 1fr;
  }

  .ca-lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .ca-detail-spec-value {
    flex-direction: column;
    align-items: flex-start;
  }

  .ca-vin-check-link {
    margin-left: 0;
    margin-top: 5px;
  }
}

/* Velmi malé obrazovky */
@media (max-width: 480px) {
  .ca-auctions-container {
    padding: 5px;
    gap: 10px;
  }

  .ca-auction-details {
    padding: 12px;
  }

  .ca-auction-title {
    font-size: 1em;
  }

  .ca-auction-price {
    font-size: 1.1em;
  }

  .ca-auction-button {
    padding: 8px 16px;
    font-size: 0.85em;
  }
}

/* Změň ikonu pro čas aukce z `dashicons-clock` na `dashicons-calendar-alt` v CSS komentáři pro lepší soulad s obsahem. */
