/* Turbo.az / X.az Exact Replica Design CSS */
:root {
  --auto-red: #ea2027;
  --auto-red-hover: #c0392b;
  --auto-green: #2ecc71;
  --auto-bg: #ffffff;
  /* Clean White Background */
  --auto-card-bg: #ffffff;
  --auto-text: #2c3e50;
  --auto-text-muted: #7f8c8d;
  --auto-border: #e2e8f0;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.dark-mode {
  --auto-bg: #0B0F19;
  --auto-card-bg: #141D2A;
  --auto-text: #f8fafc;
  --auto-text-muted: #94a3b8;
  --auto-border: #1e293b;
}

body.dark-mode .top-header {
  background-color: #0B0F19;
  border-bottom-color: #141D2A;
}

body.dark-mode .top-link {
  color: #94a3b8;
}

body.dark-mode .sidebar-box,
body.dark-mode .main-filter-card,
body.dark-mode .turbo-card {
  background-color: #141D2A;
  border-color: #1e293b;
}

body.dark-mode .sidebar-item {
  color: #cbd5e1;
}

body.dark-mode .sidebar-item:hover,
body.dark-mode .sidebar-item.active {
  background-color: #1e293b;
}

body.dark-mode .filter-select,
body.dark-mode .filter-input-group input,
body.dark-mode .filter-input-group,
body.dark-mode .pill-btn {
  background-color: #0B0F19;
  color: #f8fafc;
  border-color: #1e293b;
}

body.dark-mode .filter-input-group input {
  border-color: #1e293b;
}

body.dark-mode .turbo-title {
  color: #f8fafc;
}

body.dark-mode .turbo-title a {
  color: #f8fafc;
}

/* CUSTOM MULTI-CHECKBOX DROPDOWN STYLES */
.custom-dropdown-container {
  position: relative;
  width: 100%;
}

.custom-dropdown-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.custom-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: white;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  padding: 8px 0;
  margin-top: 4px;
}

.dropdown-clear-btn {
  padding: 6px 14px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
  font-weight: 500;
}

.dropdown-options-list {
  display: flex;
  flex-direction: column;
  max-height: 220px;
  overflow-y: auto;
}

.dropdown-option-item {
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1e293b;
}

.dropdown-option-item:hover {
  background-color: #f8fafc;
}

.dropdown-option-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--auto-red);
}

body.dark-mode .custom-dropdown-menu {
  background-color: #141D2A !important;
  border-color: #1e293b !important;
}

body.dark-mode .dropdown-option-item {
  color: #f8fafc !important;
}

body.dark-mode .dropdown-option-item:hover {
  background-color: #1e293b !important;
}

body.dark-mode .dropdown-clear-btn {
  color: #94a3b8 !important;
  border-bottom-color: #1e293b !important;
}



body.dark-mode .section-header-title {
  color: #94a3b8;
}

body.dark-mode .bottom-tab-item {
  color: #94a3b8;
}

body.dark-mode footer {
  background-color: #0B0F19 !important;
  border-top-color: var(--auto-red) !important;
}

/* =========================================================
   DARK MODE - COMPREHENSIVE WHITE AREA FIXES
   ========================================================= */

/* Filter box / main filter card */
body.dark-mode .filter-box,
body.dark-mode .main-filter-card {
  background-color: #141D2A !important;
  border-color: #1e293b !important;
}

/* Section title border */
body.dark-mode .section-title {
  color: #f8fafc !important;
  border-bottom-color: #1e293b !important;
}

/* Category tabs border */
body.dark-mode .filter-tabs-main-wrapper {
  border-bottom-color: #1e293b !important;
}

body.dark-mode .tab-main-item {
  color: #94a3b8 !important;
}

body.dark-mode .tab-main-item.active,
body.dark-mode .tab-main-item:hover {
  color: var(--auto-red) !important;
}

/* Form controls (select, input) */
body.dark-mode .form-control {
  background-color: #0B0F19 !important;
  color: #f8fafc !important;
  border-color: #1e293b !important;
}

body.dark-mode .filter-select,
body.dark-mode .filter-input {
  background-color: #0B0F19 !important;
  color: #f8fafc !important;
  border-color: #1e293b !important;
}

/* Filter input group (price, year, mileage ranges) */
body.dark-mode .filter-input-group {
  border-color: #1e293b !important;
  background-color: #0B0F19 !important;
}

body.dark-mode .filter-input-group input {
  background-color: #0B0F19 !important;
  color: #f8fafc !important;
  border-color: #1e293b !important;
}

/* Filter pills */
body.dark-mode .pill-btn {
  background-color: #141D2A !important;
  color: #94a3b8 !important;
  border-color: #1e293b !important;
}

body.dark-mode .pill-btn.active,
body.dark-mode .pill-btn:hover {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

/* Bottom tabs */
body.dark-mode .bottom-tabs {
  border-bottom-color: #1e293b !important;
}

body.dark-mode .bottom-tab-item {
  color: #94a3b8 !important;
}

/* Outline buttons */
body.dark-mode .btn-outline {
  background-color: #141D2A !important;
  color: #94a3b8 !important;
  border-color: #1e293b !important;
}

body.dark-mode .btn-outline:hover {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

/* Extra filter wrapper */
body.dark-mode .extra-filters-wrapper {
  border-top-color: #1e293b !important;
}

/* Form group labels */
body.dark-mode .form-group label {
  color: #94a3b8 !important;
}

/* Create/Edit vehicle form page background */
body.dark-mode [style*="background-color: var(--bg-card)"] {
  background-color: #141D2A !important;
}

/* Generic white background inline style overrides */
body.dark-mode input[type="text"],
body.dark-mode input[type="number"],
body.dark-mode input[type="email"],
body.dark-mode input[type="password"],
body.dark-mode input[type="tel"],
body.dark-mode select,
body.dark-mode textarea {
  background-color: #0B0F19 !important;
  color: #f8fafc !important;
  border-color: #1e293b !important;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
  color: #475569 !important;
}

/* Count badge */
body.dark-mode .count-badge {
  background-color: #1e293b !important;
  color: #94a3b8 !important;
}

/* Section count info */
body.dark-mode .filter-count-info {
  color: #94a3b8 !important;
}

/* Extra filter button */
body.dark-mode .btn-extra-filter {
  color: #94a3b8 !important;
}

body.dark-mode .btn-extra-filter:hover {
  color: var(--auto-red) !important;
}

/* Sort / filter action row */
body.dark-mode .filter-action-row {
  border-top-color: #1e293b !important;
}

/* Scrollbar in dark mode */
body.dark-mode ::-webkit-scrollbar-thumb {
  background: #1e293b !important;
}

body.dark-mode ::-webkit-scrollbar-track {
  background: #0B0F19 !important;
}

/* Turbo card image badge in dark mode already handled; adding detail page spec table */
body.dark-mode .spec-row-item {
  border-bottom-color: #1e293b !important;
}

/* Dashboard inline form style overrides */
body.dark-mode [style*="background-color: var(--auto-card-bg"] {
  background-color: #141D2A;
}

/* Filter tabs main wrapper border fix */
body.dark-mode .filter-tabs-main {
  border-bottom-color: #1e293b !important;
}



* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--auto-bg);
  color: var(--auto-text);
  line-height: 1.4;
  font-size: 14px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* 1. TOP HEADER */
.top-header {
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 6px 0;
  font-size: 12px;
  color: #64748b;
}

.container {
  max-width: 1160px;
  /* Centered compact Turbo.az layout width */
  margin: 0 auto;
  padding: 0 16px;
}

.top-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.flags {
  display: flex;
  gap: 6px;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-link {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #475569;
}

.top-link:hover {
  color: var(--auto-red);
}

/* 2. MAIN HEADER */
.main-header {
  background-color: #272f3d;
  padding: 10px 0;
  color: white;
}

body.dark-mode .main-header {
  background-color: #141D2A;
  border-bottom: 1px solid #1e293b;
}

.main-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.logo-text {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -1.5px;
  color: white;
}

.logo-text span {
  color: var(--auto-red);
}

/* Compact Search Bar - Absolute Dead Center */
.header-search {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  max-width: 440px;
  width: 100%;
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: 6px;
  overflow: hidden;
  padding: 0 12px;
  height: 38px;
}

body.dark-mode .header-search {
  background-color: #0B0F19;
  border: 1px solid #1e293b;
}

body.dark-mode .header-search input {
  background-color: #0B0F19;
  color: #f8fafc;
}


.header-search input {
  width: 100%;
  border: none;
  padding: 6px;
  outline: none;
  font-size: 13px;
  color: #333;
}

.header-search .hint {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}

.btn-add-listing {
  background-color: var(--auto-green);
  color: white;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  white-space: nowrap;
  margin-left: auto;
}

.btn-add-listing:hover {
  background-color: #27ae60;
}

/* LAYOUT MAIN */
.page-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.page-layout.no-sidebar {
  grid-template-columns: 1fr !important;
}

@media screen and (max-width: 1024px) {
  .page-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  .desktop-sidebar {
    display: none !important;
  }

  main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
}


/* STICKY LEFT SIDEBAR (Scrolls down with page) */
aside {
  position: sticky;
  top: 15px;
  z-index: 50;
}


/* LEFT SIDEBAR NAVIGATION */
.sidebar-box {
  background-color: white;
  border-radius: 8px;
  border: 1px solid var(--auto-border);
  padding: 12px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sidebar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  color: #334155;
  font-size: 13px;
  font-weight: 500;
}

.sidebar-item:hover,
.sidebar-item.active {
  background-color: #f1f5f9;
  color: var(--auto-red);
}

.sidebar-item i {
  width: 20px;
  color: #64748b;
}

.count-badge {
  background-color: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
}

/* MAIN FILTER BOX */
.main-filter-card {
  background-color: white;
  border-radius: 8px;
  border: 1px solid var(--auto-border);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
}

/* Category Tabs (Cars, Moto, Tech, Plates) */
.filter-tabs-main-wrapper {
  width: 100%;
  overflow-x: auto;
  border-bottom: 2px solid #f1f5f9;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

.filter-tabs-main {
  display: flex;
  gap: 24px;
  padding-bottom: 12px;
  white-space: nowrap;
}

.tab-main-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
  text-transform: uppercase;
  flex-shrink: 0;
}

.tab-main-item.active,
.tab-main-item:hover {
  color: var(--auto-red);
}

.tab-main-item i {
  font-size: 15px;
}

.filter-action-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-count-info {
  font-size: 12px;
  color: #64748b;
}

.filter-action-btns {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-extra-filter {
  background: none;
  border: none;
  font-size: 13px;
  color: #475569;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* Sub filter pills (Hamısı, Yeni, Sürülmüş, Kredit, Barter...) */
.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.pill-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #cbd5e1;
  background-color: white;
  color: #334155;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}

.pill-btn.active,
.pill-btn:hover {
  border-color: #f59e0b;
  color: #1e293b;
  background-color: #ffffff;
}

/* Filter Fields Grid */
.filter-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-row-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.filter-select,
.filter-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  color: #334155;
  background-color: white;
  outline: none;
}

.filter-select:focus,
.filter-input:focus {
  border-color: var(--auto-red);
}

/* Custom Checkbox Multi-select Dropdown (Turbo.az Style) */
.custom-dropdown-container {
  position: relative;
  width: 100%;
}

.custom-dropdown-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.custom-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  min-width: 240px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 100;
  padding: 8px 0;
  box-sizing: border-box;
}

.custom-dropdown-container.open .custom-dropdown-menu {
  display: block;
}

.dropdown-clear-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
  transition: color 0.15s ease;
}

.dropdown-clear-btn:hover {
  color: var(--auto-red);
}

.dropdown-options-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 4px 0;
}

.dropdown-options-list::-webkit-scrollbar {
  width: 6px;
}

.dropdown-options-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.dropdown-option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
  transition: background-color 0.12s ease;
  margin: 0;
}

.dropdown-option-item:hover {
  background-color: #f8fafc;
}

.dropdown-option-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--auto-red);
  cursor: pointer;
  border-radius: 4px;
}

.filter-row-flex {
  display: flex;
  gap: 12px;
  align-items: center;
}

.filter-input-group {
  display: flex;
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
}

.filter-input-group input {
  width: 50%;
  border: none;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 400;
  outline: none;
}

.filter-input-group input:first-child {
  border-right: 1px solid #cbd5e1;
}

.btn-search-red {
  background-color: var(--auto-red);
  color: white;
  font-weight: 600;
  font-size: 12px;
  padding: 7px 22px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
}

.btn-search-red:hover {
  background-color: var(--auto-red-hover);
}

.extra-filters-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
}

.filter-extra-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: center;
}

.color-picker-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.color-picker-group span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-block;
  transition: transform 0.15s ease;
}

.color-picker-group span:hover {
  transform: scale(1.2);
}

/* LISTING CARDS GRID */
.section-header-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.turbo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 30px;
  width: 100%;
}

@media (max-width: 1100px) {
  .turbo-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}

.turbo-card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--auto-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  position: relative;
  display: flex;
  flex-direction: column;
}

.turbo-card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}


.turbo-card-img {
  position: relative;
  width: 100%;
  height: 160px;
  background-color: #0f172a;
}

.turbo-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}



.turbo-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.turbo-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--auto-red);
  margin-bottom: 4px;
}

.turbo-title {
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.turbo-details {
  font-size: 12px;
  font-weight: 400;
  color: #64748b;
  margin-bottom: 8px;
  min-height: 18px;
  line-height: 18px;
}

.turbo-location-date {
  margin-top: auto;
  font-size: 11px;
  font-weight: 400;
  color: #94a3b8;
}

/* SUB CATEGORY BOTTOM TABS */
.bottom-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 8px;
}

/* SECTION TITLE & STANDARD FILTER BOX STYLING */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

.section-title span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-box {
  background-color: #ffffff;
  border-radius: 8px;
  border: 1px solid var(--auto-border);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media screen and (max-width: 768px) {
  .filter-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .section-title {
    font-size: 14px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-control {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  color: #334155;
  background-color: #ffffff;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: var(--auto-red);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background-color: var(--auto-red);
  color: white !important;
  border-color: var(--auto-red);
}

.btn-primary:hover {
  background-color: var(--auto-red-hover);
}

.btn-outline {
  background-color: white;
  color: #475569 !important;
  border-color: #cbd5e1;
}

.btn-outline:hover {
  background-color: #f1f5f9;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

/* Interactive Card Elements & Image Switcher */
.card-heart-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s ease, transform 0.1s ease;
}

.card-heart-btn:hover {
  background: rgba(234, 32, 39, 0.8);
  transform: scale(1.1);
}

.card-hover-progress {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  z-index: 20;
}

.progress-segment {
  flex: 1;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 2px;
  transition: background-color 0.1s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.progress-segment.active {
  background-color: #ea2027 !important;
  /* Turbo.az Bright Red */
}

/* Integrated Seamless Turbo.az Notch Tag (Connected to Body) */
.card-badge-pill {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--auto-card-bg, #ffffff);
  color: var(--auto-text, #1e293b);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px 2px 14px;
  border-top-left-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 6;
}

.card-badge-pill::before {
  content: "";
  position: absolute;
  left: -12px;
  bottom: 0;
  width: 12px;
  height: 12px;
  background: transparent;
  border-bottom-right-radius: 12px;
  box-shadow: 4px 4px 0 4px var(--auto-card-bg, #ffffff);
  pointer-events: none;
}

body.dark-mode .card-badge-pill {
  background: #141D2A;
  color: #f8fafc;
}

body.dark-mode .card-badge-pill::before {
  box-shadow: 4px 4px 0 4px #141D2A;
}

.card-badge-pill .divider,
.card-badge-pill .badge-divider {
  color: var(--auto-text-muted, #94a3b8);
  font-size: 10px;
}

/* Hide badge tag when mouse enters/hovers over image gallery */
.turbo-card-img:hover .card-badge-pill {
  display: none !important;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE MEDIA QUERIES (320px - 1024px)
   ========================================================================== */

@media screen and (max-width: 1024px) {
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 12px !important;
  }

  .page-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  aside {
    width: 100% !important;
    position: static !important;
  }

  .sidebar-box {
    display: flex !important;
    overflow-x: auto !important;
    padding: 8px 10px !important;
    gap: 8px !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none !important;
  }

  .sidebar-box::-webkit-scrollbar {
    display: none !important;
  }

  .sidebar-item {
    border: 1px solid var(--auto-border) !important;
    border-radius: 20px !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    flex-shrink: 0;
  }

  .turbo-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
  }
}

@media screen and (max-width: 768px) {

  html,
  body {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
  }

  /* TOP HEADER BAR MOBILE RESTRUCTURE */
  .top-header-inner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .top-left {
    justify-content: space-between !important;
    font-size: 11px !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .top-right {
    justify-content: space-between !important;
    font-size: 11px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    border-top: 1px solid var(--auto-border);
    padding-top: 6px;
  }

  /* MAIN HEADER MOBILE RESTRUCTURE */
  .main-header-inner {
    flex-wrap: wrap !important;
    gap: 10px !important;
    justify-content: space-between !important;
  }

  .logo-text {
    font-size: 24px !important;
  }

  .header-search {
    position: static !important;
    transform: none !important;
    max-width: 100% !important;
    width: 100% !important;
    order: 3 !important;
    margin: 4px 0 0 0 !important;
    box-sizing: border-box !important;
  }

  .btn-add-listing {
    font-size: 11px !important;
    padding: 6px 10px !important;
  }

  /* MAIN FILTER CARD MOBILE FIX */
  .main-filter-card {
    padding: 12px 10px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* Force top category selector tabs to be horizontally scrollable without breaking page boundaries */
  .filter-tabs-main-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    padding-bottom: 6px !important;
    margin-bottom: 12px !important;
    border-bottom: 2px solid #f1f5f9 !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
  }

  .filter-tabs-main {
    display: inline-flex !important;
    gap: 16px !important;
    padding-bottom: 4px !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
    width: max-content !important;
  }

  .tab-main-item {
    font-size: 11px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  /* Force sub filter pills to scroll horizontally */
  .filter-pills {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    padding-bottom: 8px !important;
    margin-bottom: 14px !important;
    gap: 6px !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .pill-btn {
    flex-shrink: 0 !important;
    font-size: 11px !important;
    padding: 4px 10px !important;
  }

  .filter-rows {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .filter-row-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .custom-dropdown-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .filter-select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    font-size: 12px !important;
    padding: 8px 10px !important;
  }

  /* Dual Input Group Fix (Price, Year, Mileage) */
  .filter-input-group {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
  }

  .filter-input-group input {
    flex: 1 1 0% !important;
    width: 50% !important;
    min-width: 0 !important;
    max-width: 50% !important;
    box-sizing: border-box !important;
    font-size: 12px !important;
    padding: 8px 10px !important;
    border: none !important;
  }

  .filter-input-group input:first-child {
    border-right: 1px solid #cbd5e1 !important;
  }

  .filter-extra-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .filter-action-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin-top: 12px !important;
  }

  .filter-action-btns {
    margin-left: 0 !important;
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }

  .btn-extra-filter {
    font-size: 12px !important;
    flex-shrink: 0 !important;
  }

  .btn-search-red {
    flex: 1 !important;
    width: 100% !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    text-align: center !important;
  }

  /* PERFECT 2 CARDS PER ROW MOBILE GRID */
  .turbo-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .turbo-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .turbo-card-img {
    height: 120px !important;
    width: 100% !important;
  }

  .turbo-card-body {
    padding: 8px 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .turbo-price {
    font-size: 13px !important;
    margin-bottom: 2px !important;
    white-space: nowrap !important;
  }

  .turbo-title {
    font-size: 11px !important;
    margin-bottom: 2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  .turbo-title a {
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .turbo-details {
    font-size: 10px !important;
    line-height: 1.2 !important;
    margin-bottom: 4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .turbo-location-date {
    font-size: 9px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .detail-layout {
    grid-template-columns: 1fr !important;
  }

  .gallery-main {
    height: 250px !important;
  }

  .spec-grid {
    grid-template-columns: 1fr !important;
  }

  /* Car Detail Page Mobile Overrides */
  .turbo-detail-container {
    padding: 0 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .detail-grid-main {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 16px !important;
  }

  .specs-table-container {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .spec-row-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    padding: 4px 0 !important;
    border-bottom: 1px dashed #f1f5f9 !important;
    font-size: 13px !important;
  }

  .seller-card-box {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}