/* =========================================================
   AMERICARA CARS – FINAL STYLES (Fixed Dropdowns & Green Badges)
   ========================================================= */

:root {
  --ac-bg-main: var(--bg-main, #0b0e12);
  --ac-bg-surface: var(--bg-surface, #0f141b);
  --ac-bg-lighter: var(--bg-graphite, #141a22);
  --ac-text: var(--text, #e8edf4);
  --ac-text-muted: var(--text-muted, rgba(255,255,255,.72));
  --ac-border: var(--border, rgba(255,255,255,.10));
  --ac-accent: var(--brand-accent, #d11f2a);
  --ac-radius: 14px;
  
  /* KAINA: Žalia (Emerald) */
  --ac-price-bg: #15803d;  
  --ac-price-shadow: rgba(21, 128, 61, 0.4);
}

/* =========================================================
   GLOBAL WRAPPER
   ========================================================= */

.amer-archive-wrapper {
  background-color: var(--ac-bg-lighter);
  border: 1px solid var(--ac-border);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  margin-bottom: 40px;
}

@media (min-width: 992px) {
  .amer-archive-wrapper {
    padding: 40px;
  }
}

/* =========================================================
   ARCHIVE: FILTERS (DROPDOWN FIX)
   ========================================================= */

.amer-cars-archive .form-control,
.amer-cars-archive .form-select {
  background-color: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 10px;
}

.amer-cars-archive .form-control:focus,
.amer-cars-archive .form-select:focus {
  background-color: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.3);
  box-shadow: none;
  color: #fff;
}

/* SVARBU: Sutvarko, kad išskleidus meniu matytųsi tekstas */
.amer-cars-archive .form-select option {
  background-color: var(--ac-bg-surface); /* Tamsus fonas */
  color: var(--ac-text);                  /* Šviesus tekstas */
}

.amer-cars-archive .form-label {
  font-size: 0.85rem;
  color: var(--ac-text-muted);
}

/* =========================================================
   ARCHIVE: CAR CARD
   ========================================================= */

.amer-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--ac-bg-surface);
  border: 1px solid var(--ac-border);
  border-radius: var(--ac-radius);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  position: relative;
}

.amer-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 14px 40px rgba(0,0,0,0.4);
}

/* --- Image Handling (Bulletproof) --- */
.amer-card-media-wrap {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 75%; /* 4:3 Aspect Ratio */
  overflow: hidden;
  background: #1a1f26;
  border-bottom: 1px solid var(--ac-border);
  flex-shrink: 0;
}

.amer-card-media-wrap > a {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

.amer-card-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
  z-index: 1;
  border: none;
}

.amer-card:hover .amer-card-media {
  transform: scale(1.03);
}

.amer-card-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1f26;
  color: rgba(255,255,255,0.2);
}

/* --- Badges (Header) --- */
.amer-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
  z-index: 5;
}

.amer-badges .badge {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.amer-sold .amer-card-media {
  filter: grayscale(80%);
  opacity: 0.75;
}

/* --- Card Content --- */
.amer-card .card-body {
  padding: 16px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.amer-card .card-title {
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.amer-card .card-title a {
  color: var(--ac-text);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.1rem;
}
.amer-card .card-title a:hover { color: var(--ac-accent); }

.amer-specs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.amer-specs-chips .badge {
  background: rgba(255,255,255,0.08) !important;
  color: var(--ac-text-muted) !important;
  font-weight: 400;
  border: 1px solid rgba(255,255,255,0.05);
}

.amer-card-details {
  font-size: 0.85rem;
  color: var(--ac-text-muted);
  margin-top: auto;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ac-border);
  margin-bottom: 12px;
}

/* --- Footer & Buttons --- */
.amer-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ARCHYVO KAINA (BADGE STYLE) */
.amer-price {
  display: inline-block;
  background-color: var(--ac-price-bg); /* Žalias fonas */
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 12px;
  box-shadow: 0 4px 12px var(--ac-price-shadow);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

a.btn-card-action {
  display: inline-block;
  border-radius: 20px;
  font-size: 0.85rem;
  padding: 6px 16px;
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  text-decoration: none;
  transition: all 0.2s;
  background: transparent;
}
a.btn-card-action:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* --- Pagination --- */
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  margin: 0 4px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  color: var(--ac-text);
  text-decoration: none;
  border: 1px solid transparent;
}
.page-numbers.current { background: var(--ac-accent); color: #fff; font-weight: bold; }
.page-numbers:hover:not(.current) { background: rgba(255,255,255,0.1); }

/* --- Offcanvas --- */
.offcanvas { background-color: var(--ac-bg-surface); color: var(--ac-text); }
.offcanvas .btn-close { filter: invert(1); }


/* =========================================================
   SINGLE CAR VIEW
   ========================================================= */

/* --- Header & Title --- */
.amer-single-header h1 {
  font-weight: 700;
  color: #fff;
}

/* --- Price Box (SINGLE VIEW) --- */
.amer-price-box {
  background: var(--ac-price-bg); /* Tamsesnė žalia */
  color: #fff;
  padding: 12px 24px;
  border-radius: 16px;
  display: inline-block;
  text-align: center;
  box-shadow: 0 8px 20px var(--ac-price-shadow);
  border: 1px solid rgba(255,255,255,0.2);
  transition: transform 0.2s ease;
}
.amer-price-box:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}
.amer-single-price {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.amer-price-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  margin-bottom: 2px;
}

/* --- Gallery --- */
.amer-gallery-frame {
  background: #000;
  border-radius: var(--ac-radius);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--ac-border);
}

.amer-gallery-img {
  width: 100%;
  height: 450px;
  object-fit: contain;
  background: #000;
}
@media (min-width: 992px) {
  .amer-gallery-img { height: 550px; }
}

.amer-fullscreen-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(4px);
  border-radius: 6px;
}
.amer-fullscreen-btn:hover { background: rgba(255,255,255,0.9); color: #000; }

/* --- Thumbs --- */
.amer-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-top: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--ac-accent) var(--ac-bg-surface);
}
.amer-thumb {
  flex: 0 0 80px;
  height: 60px;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  background: transparent;
  padding: 0;
  transition: all 0.2s;
}
.amer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.amer-thumb:hover { opacity: 1; }
.amer-thumb.is-active { border-color: var(--ac-accent); opacity: 1; }

/* --- Description Box --- */
.amer-description-box {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 30px;
  margin-top: 20px;
}
.amer-description-box h2 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 15px;
}
.amer-content-area {
  color: #d1d5db;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* --- Sidebar Specs --- */
.amer-sticky-cta {
  position: sticky;
  top: 100px;
}
.amer-specs-list .list-group-item {
  background: transparent;
  border-color: rgba(255,255,255,0.1);
  color: var(--ac-text);
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
}
.amer-specs-list .list-group-item span { color: var(--ac-text-muted); }
.amer-specs-list .list-group-item strong { color: #fff; }

.amer-code-box {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}
.amer-code-value {
  font-family: monospace;
  font-size: 1.1rem;
  letter-spacing: 1px;
  color: #fff;
}

/* =========================================================
   EMPTY STATE (Kai nerasta automobilių)
   ========================================================= */

.amer-empty-state {
  text-align: center;
  padding: 80px 20px;
  background-color: rgba(255, 255, 255, 0.02); /* Labai neryškus fonas */
  border: 2px dashed rgba(255, 255, 255, 0.15); /* Punktyrinis rėmelis */
  border-radius: 24px;
  margin-top: 30px;
  color: var(--ac-text-muted);
}

.amer-empty-icon {
  font-size: 3rem;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.2); /* Neryški piktograma */
}

.amer-empty-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.amer-empty-text {
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 30px auto;
  line-height: 1.6;
}