/* ===========================================================
  car.css - Stiluri suplimentare specifice paginii car.php
  =========================================================== */

/* =========================
  1. Galerie Foto
  ========================= */

body.electri-car .car-gallery {
  width: 100%;
  max-width: 1000px;
  margin: 20px auto;
}

/* Container imagine principală - fără border, centrat */
body.electri-car .main-image {
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000; /* fallback dacă imaginea se încarcă lent */
}

/* Imaginea principală */
body.electri-car .main-image img,
body.electri-car #mainPhoto {
  width: 100%;
  height: 100%;
  max-width: 700px;
  object-fit: cover;
  object-position: center center;
  border-radius: 12px;
  border: none;
  transition: transform 0.3s ease;
}

/* Rând miniaturi */
body.electri-car .thumbnail-row,
body.electri-car #thumbnailRow {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  margin-top: 15px;
  padding: 10px 0;
  justify-content: center;
}

/* Miniaturi */
body.electri-car .thumbnail-row img {
  width: 100px;
  height: 60px; /* raport consistent 16:9 */
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

/* Miniatură activă sau hover */
body.electri-car .thumbnail-row img:hover,
body.electri-car .thumbnail-row img.active {
  border-color: #99d8ff;
  transform: scale(1.05);
}

/* =========================
  2. Smart Tags
  ========================= */

body.electri-car .smart-tags-section {
  width: 100%;
}

body.electri-car .smart-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.electri-car .smart-tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(153, 216, 255, 0.45);
  border-radius: 6px;
  background: #111827;
  color: #e5f5ff;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
}

/* =========================
  3. Lightbox Galerie
  ========================= */

body.electri-car .lightbox,
body.electri-car #lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

body.electri-car .lightbox.open {
  display: flex;
}

body.electri-car .lightbox-content,
body.electri-car #lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 8px;
}

body.electri-car .lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
}

/* =========================
  4. Tabele Caracteristici
  ========================= */

body.electri-car table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 20px auto;
  background-color: #111;
  border-radius: 8px;
  overflow: hidden;
}

/* Coloana 1 (etichete) - latime fixa */
body.electri-car table td:first-child {
  width: 200px;
  min-width: 160px;
  font-weight: 600;
  color: #99d8ff;
}

/* Desktop: latime mai mare pentru etichete */
@media (min-width: 1024px) {
  body.electri-car table td:first-child {
   width: 400px;
  }
}

/* Celule generale */
body.electri-car td,
body.electri-car th {
  padding: 12px;
  border: 1px solid #333;
  text-align: left;
  background-color: #1a1a1a;
  color: #ddd;
}

/* Evidentiere pe toata linia la hover */
body.electri-car table td:hover {
  background-color: #2a2a2a;
}

/* =========================
  5. Grup Butoane Laterale
  ========================= */

body.electri-car .side-button-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: #1a1a1a;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #333;
}

body.electri-car .side-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  background-color: #152fa3;
  color: #fff;
  padding: 10px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

body.electri-car .side-btn:hover {
  background-color: #99d8ff;
  color: #000;
  transform: translateX(4px);
}

/* Side buttons compatibilitate layout 3-coloane */
body.electri-car .side-btn.w-full {
  width: 100%;
  margin-bottom: 8px;
}

/* Favorites button states */
body.electri-car #favoriteThisCar {
  transition: all 0.3s ease;
}

body.electri-car #favoriteThisCar.favorited {
  background-color: #ef4444;
  color: white;
}

body.electri-car #favoriteThisCar.favorited:hover {
  background-color: #dc2626;
  color: white;
  transform: translateX(4px);
}

body.electri-car #favoriteThisCar i {
  transition: all 0.2s ease;
}

body.electri-car #favoriteThisCar.favorited i {
  color: white;
  transform: scale(1.1);
}

/* Responsive pentru butoane laterale */
@media (max-width: 768px) {
  body.electri-car .side-button-group {
   position: relative;
   top: auto;
   padding: 12px;
  }
  body.electri-car .side-btn {
   width: 100%;
   justify-content: center;
  }
}

/* =========================
  5. Accesibilitate (Focus)
  ========================= */

body.electri-car .side-btn:focus,
body.electri-car .thumbnail-row img:focus {
  outline: 2px solid #99d8ff;
  outline-offset: 2px;
}

/* =========================
  6. Prevent Auto Ads in Social Share
  ========================= */

/* Prevent AdSense from auto-placing ads in social share section */
#socialShare .google-auto-placed,
#socialShare ins.adsbygoogle {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
