/* ==========================================================================
   Great Dubai - shared styling for the car listing index pages
   (/rent-a-car/locations, /brands, /types, /colors and their segment twins).

   Mirrors the design language of the main /rent-a-car page:
   #f6f7fb section, 1200px container, purple eyebrow + bold heading,
   white cards with #e2e8f0 borders.
   ========================================================================== */

.gd-listing-page {
  background-color: #f6f7fb;
  padding: 2.75rem 1.5rem 3.5rem;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  width: 100%;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

.gd-listing-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== Page header ===== */
.gd-listing-header {
  margin-bottom: 1.75rem;
}

.gd-listing-eyebrow {
  color: #7c3aed;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}

.gd-listing-title {
  color: #0f172a;
  font-size: 2.1rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: capitalize;
}

.gd-listing-sub {
  color: #64748b;
  font-size: 0.95rem;
  margin: 8px 0 0 0;
}

/* ===== Search field ===== */
/* The shared stylesheets carry a global `* { padding: 0 }` reset and legacy
   `.myaside input` rules, so the box metrics below need !important to hold. */
.gd-listing-search {
  position: relative;
  max-width: 520px;
  margin-bottom: 2rem;
}

.gd-listing-search input[type="text"] {
  width: 100% !important;
  height: 48px !important;
  padding: 0 16px 0 44px !important;
  margin: 0 !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-family: inherit;
  color: #334155 !important;
  outline: none !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gd-listing-search input[type="text"]:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

.gd-listing-search input[type="text"]::placeholder {
  color: #94a3b8;
}

.gd-listing-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

/* ===== Grid =====
   Each page sets --gd-card-min to control how narrow a column may get. */
.gd-listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--gd-card-min, 220px), 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ===== Card ===== */
.gd-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.4rem 1.3rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.25s ease;
}

.gd-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -6px rgba(15, 23, 42, 0.08);
  text-decoration: none;
}

.gd-card-title {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gd-card:hover .gd-card-title {
  color: #7c3aed;
}

.gd-card-count {
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 500;
  margin: 8px 0 0 0;
}

.gd-card-icon {
  flex-shrink: 0;
  color: #7c3aed;
}

/* ===== Card variant: centred, with a logo (brands) ===== */
.gd-card--centered {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem 1rem;
}

.gd-card--centered .gd-card-title {
  font-size: 0.95rem;
  justify-content: center;
}

.gd-card--centered .gd-card-count {
  font-size: 0.78rem;
  margin-top: 2px;
}

.gd-card-logo {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.gd-card-logo img {
  max-height: 40px;
  max-width: 70px;
  object-fit: contain;
}

/* ===== Card variant: colour swatch (colors) ===== */
.gd-card--swatch {
  padding: 0;
  overflow: hidden;
}

.gd-card-swatch {
  height: 84px;
  width: 100%;
  border-bottom: 1px solid #e2e8f0;
}

.gd-card--swatch .gd-card-body {
  padding: 0.9rem 1.1rem 1.1rem;
}

.gd-card--swatch .gd-card-title {
  font-size: 0.95rem;
}

/* ===== Empty / no-results state ===== */
.gd-listing-empty {
  grid-column: 1 / -1;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  padding: 2.5rem 1rem;
  text-align: center;
  color: #64748b;
  font-size: 0.95rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .gd-listing-page {
    padding: 2rem 1rem 2.5rem;
  }

  .gd-listing-title {
    font-size: 1.5rem;
  }

  .gd-listing-grid {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .gd-listing-grid {
    grid-template-columns: repeat(auto-fill, minmax(var(--gd-card-min-sm, 150px), 1fr));
    gap: 10px;
  }
}
