/* Catálogo público — filtros + ficha sticky */

.ma-catalog-section {
  padding-bottom: 48px;
}

.ma-catalog-head {
  margin-bottom: 24px;
}

.ma-catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.ma-catalog-count {
  margin: 0;
  color: var(--ma-muted);
  font-size: 15px;
}

.ma-catalog-sort {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  flex-wrap: wrap;
}

.ma-catalog-sort-label {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ma-ink);
  white-space: nowrap;
}

.ma-catalog-sort-select {
  min-width: min(100%, 240px);
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--ma-line);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
  cursor: pointer;
}

.ma-catalog-sort-select:focus {
  outline: none;
  border-color: var(--ma-accent);
  box-shadow: 0 0 0 3px rgba(64, 95, 242, 0.12);
}

.ma-catalog-layout {
  align-items: flex-start;
}

.ma-catalog-sidebar {
  position: sticky;
  top: 96px;
  z-index: 20;
}

.ma-catalog-filters {
  background: #fff;
  border: 1px solid var(--ma-line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(5, 11, 32, 0.06);
}

.ma-catalog-filters.is-collapsed .ma-filters-body {
  display: none;
}

.ma-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.ma-filters-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.ma-filter-toggle {
  border: 1px solid var(--ma-line);
  background: var(--ma-paper);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: none;
}

.ma-filter-group {
  margin-bottom: 16px;
}

.ma-filter-group > label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ma-muted);
}

.ma-search-input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--ma-line);
  border-radius: 12px;
  font-size: 15px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23616670' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 14px center no-repeat;
}

.ma-search-input:focus {
  outline: none;
  border-color: var(--ma-accent);
  box-shadow: 0 0 0 3px rgba(64, 95, 242, 0.12);
}

.ma-drop-menu {
  position: relative;
}

.ma-drop-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--ma-line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.ma-drop-menu.open .ma-drop-select {
  border-color: var(--ma-accent);
  box-shadow: 0 0 0 3px rgba(64, 95, 242, 0.1);
}

.ma-drop-list {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--ma-line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(5, 11, 32, 0.12);
  z-index: 30;
}

.ma-drop-menu.open .ma-drop-list {
  display: block;
}

.ma-drop-list li[data-value] {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.ma-drop-list li[data-value]:hover,
.ma-drop-list li[data-value].active {
  background: rgba(64, 95, 242, 0.1);
  color: var(--ma-accent);
}

.ma-drop-search {
  padding: 6px !important;
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--ma-line);
  margin-bottom: 4px;
}

.ma-drop-search input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--ma-line);
  border-radius: 8px;
  font-size: 13px;
}

.ma-price-slider-wrap {
  padding: 8px 6px 0;
}

.ma-price-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 14px;
}

#catalog-price-slider {
  height: 6px;
  margin: 12px 8px 0;
}

.ma-filter-submit {
  width: 100%;
  margin-top: 8px;
  border: none;
  border-radius: 12px;
  padding: 14px;
  background: var(--ma-accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.ma-filter-submit:hover {
  background: var(--ma-accent-2);
}

.ma-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.ma-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(64, 95, 242, 0.1);
  color: var(--ma-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.ma-filter-chip:hover {
  background: rgba(64, 95, 242, 0.16);
}

/* Ficha detalle sticky */
.ma-detail-sidebar {
  position: sticky;
  top: 96px;
  z-index: 15;
}

.ma-inquiry-card {
  background: #fff;
  border: 1px solid var(--ma-line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 12px 40px rgba(5, 11, 32, 0.08);
  margin-bottom: 16px;
}

.ma-inquiry-card .price-title {
  margin: 0 0 4px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.ma-inquiry-card .price-meta {
  color: var(--ma-muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.ma-inquiry-form .ma-field {
  margin-bottom: 12px;
}

.ma-inquiry-form label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ma-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ma-input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--ma-line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
}

.ma-input:focus {
  outline: none;
  border-color: var(--ma-accent);
  box-shadow: 0 0 0 3px rgba(64, 95, 242, 0.12);
}

.ma-inquiry-submit {
  width: 100%;
  margin-top: 6px;
  border: none;
  border-radius: 12px;
  padding: 14px;
  background: var(--ma-ink);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.ma-inquiry-submit:hover {
  background: var(--ma-accent);
}

.ma-inquiry-alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
}

.ma-inquiry-alert-success {
  background: #ecfdf5;
  color: #065f46;
}

.ma-inquiry-alert-error {
  background: #fef2f2;
  color: #991b1b;
}

.ma-dealer-card {
  background: var(--ma-paper);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
}

.ma-dealer-card img {
  max-width: 140px;
  margin-bottom: 10px;
}

.ma-dealer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.ma-dealer-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--ma-line);
  text-decoration: none;
  color: var(--ma-ink);
  font-weight: 600;
  font-size: 13px;
}

.ma-dealer-links a:hover {
  border-color: var(--ma-accent);
  color: var(--ma-accent);
}

.car-block-four .image-box {
  height: 240px;
  overflow: hidden;
  border-radius: 12px;
}

.car-block-four .image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-box {
  position: relative;
}

.car-status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

@media (max-width: 991px) {
  .ma-catalog-sidebar,
  .ma-detail-sidebar {
    position: static;
    margin-bottom: 20px;
  }

  .ma-filter-toggle {
    display: inline-flex;
  }

  .ma-catalog-filters .ma-filters-body {
    display: none;
  }

  .ma-catalog-filters:not(.is-collapsed) .ma-filters-body {
    display: block;
  }
}

/* ---------- Filas compactas (coches.net) ---------- */
.ma-catalog-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ma-catalog-empty {
  padding: 48px 24px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--ma-line);
  border-radius: 16px;
}

.ma-car-row.service-block-thirteen {
  margin-bottom: 0;
}

.ma-car-row .inner-box {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(5, 11, 32, 0.06);
  border: 1px solid var(--ma-line);
}

.ma-car-row .inner-box {
  align-items: stretch;
}

.ma-car-row .image-box {
  position: relative;
  flex: 0 0 260px;
  max-width: 260px;
  align-self: flex-start;
  background: #eef1f6;
}

.ma-car-row .image-box .ma-card-gallery-wrap {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #eef1f6;
  overflow: hidden;
}

.ma-car-row .image-box .slider-thumb,
.ma-car-row .image-box .ma-card-gallery-single {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: #eef1f6;
}

.ma-car-row .image-box .ma-card-gallery-single {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ma-car-row .image-box .slider-thumb .image,
.ma-car-row .image-box .slider-thumb .image a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 100%;
}

.ma-car-row .image-box .ma-card-gallery-single {
  text-decoration: none;
}

.ma-car-row .image-box .image img,
.ma-car-row .image-box .slider-thumb img,
.ma-car-row .image-box .ma-card-gallery-single img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  display: block;
}

.ma-car-row .image-box .slider-thumb .slick-list,
.ma-car-row .image-box .slider-thumb .slick-track,
.ma-car-row .image-box .slider-thumb .slick-slide,
.ma-car-row .image-box .slider-thumb .slick-slide > div,
.ma-car-row .image-box .slider-thumb .slick-slide .image {
  height: 100%;
  min-height: 100%;
}

.ma-car-row .image-box .slider-thumb .slick-dots {
  display: flex !important;
  opacity: 1 !important;
}

.ma-car-row .slider-thumb .slick-dots {
  bottom: 8px;
  z-index: 3;
}

/* Badges sobre foto (listado, detalle, cards) */
.ma-photo-badges {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.ma-photo-badge {
  position: absolute;
  pointer-events: none;
}

.ma-photo-badge--status {
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
  box-shadow: 0 2px 10px rgba(5, 11, 32, 0.18);
}

.ma-photo-badge--eco {
  bottom: 10px;
  left: 10px;
}

.ma-photo-badge--eco img {
  display: block;
  width: 46px;
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(5, 11, 32, 0.35));
}

.ma-photo-badge--brand {
  bottom: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(5, 11, 32, 0.62);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 10px rgba(5, 11, 32, 0.2);
}

.ma-photo-badge--brand img {
  display: block;
  height: 14px;
  width: auto;
  max-width: 72px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

/* Boxcar: .service-block-thirteen .image-box img fuerza height 100% en todos los img */
body.ma-page-catalog .ma-car-row.service-block-thirteen .image-box .ma-photo-badges img,
body.ma-page-detail .ma-vdp-related .ma-car-row.service-block-thirteen .image-box .ma-photo-badges img {
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  object-fit: contain !important;
}

body.ma-page-catalog .ma-car-row.service-block-thirteen .image-box .ma-photo-badge--eco img,
body.ma-page-detail .ma-vdp-related .ma-car-row.service-block-thirteen .image-box .ma-photo-badge--eco img {
  width: 46px !important;
  max-width: 46px !important;
  height: auto !important;
}

body.ma-page-catalog .ma-car-row.service-block-thirteen .image-box .ma-photo-badge--brand img,
body.ma-page-detail .ma-vdp-related .ma-car-row.service-block-thirteen .image-box .ma-photo-badge--brand img {
  width: 72px !important;
  max-width: 72px !important;
  height: 14px !important;
  max-height: 14px !important;
}

.ma-car-row .right-box {
  flex: 1;
  min-width: 0;
  padding: 16px 20px 14px !important;
  border-left: 1px solid var(--ma-line) !important;
  border-radius: 0 14px 14px 0 !important;
  align-items: center;
}

.ma-car-row .content-box .title {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  margin-bottom: 4px !important;
}

.ma-car-row .content-box .title a {
  color: var(--ma-ink);
  text-decoration: none;
}

.ma-car-row .content-box .title a:hover {
  color: var(--ma-accent);
}

.ma-car-row .content-box .text {
  margin-bottom: 12px !important;
  font-size: 13px !important;
  color: var(--ma-muted);
}

.ma-car-row .inspection-sec {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  margin-bottom: 10px !important;
  gap: 10px 18px !important;
}

.ma-car-row .inspection-box {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 0 0 auto;
  min-width: 0;
  position: static !important;
  margin-right: 0 !important;
}

.ma-car-row .inspection-box .icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid !important;
  place-items: center;
  background: var(--ma-paper);
  border-radius: 8px;
  color: var(--ma-ink);
  font-size: 13px;
  line-height: 1;
}

.ma-car-row .inspection-box .icon i {
  display: block;
  line-height: 1;
  font-size: 13px;
}

.ma-car-row .inspection-box .info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.ma-car-row .inspection-box .info span {
  display: block !important;
  font-size: 10px !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ma-muted) !important;
  margin-bottom: 0 !important;
  line-height: 1.2;
}

.ma-car-row .inspection-box .info small {
  display: block;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--ma-ink) !important;
  line-height: 1.25;
  white-space: nowrap;
}

.ma-car-row .ul-cotent {
  margin-bottom: 0 !important;
}

.ma-car-row .ul-cotent li span {
  display: inline-block;
  padding: 3px 8px;
  background: rgba(64, 95, 242, 0.08);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ma-accent);
}

.ma-car-row .content-box-two {
  flex: 0 0 148px;
  text-align: center;
  padding-left: 16px !important;
}

.ma-car-row .content-box-two::before {
  display: none !important;
}

.ma-car-row .content-box-two .title {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  color: var(--ma-accent) !important;
  margin-bottom: 2px !important;
}

.ma-car-row .content-box-two > span {
  font-size: 11px !important;
  color: var(--ma-muted);
}

.ma-car-row .content-box-two .button {
  margin-top: 10px;
  padding: 8px 14px !important;
  font-size: 12px !important;
  font-weight: 700;
  border-radius: 8px;
  background: rgba(64, 95, 242, 0.1);
  color: var(--ma-accent) !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ma-car-row .content-box-two .button:hover {
  background: var(--ma-accent);
  color: #fff !important;
}

.ma-vdp-related .ma-car-row .inner-box {
  box-shadow: none;
}

@media (max-width: 991px) {
  .ma-car-row .inner-box {
    flex-direction: column;
  }

  .ma-car-row .image-box {
    flex: none;
    max-width: none;
    width: 100%;
  }

  .ma-car-row .image-box .ma-card-gallery-wrap {
    aspect-ratio: 16 / 10;
    border-radius: 14px 14px 0 0;
  }

  .ma-car-row .image-box .image img,
  .ma-car-row .image-box .slider-thumb img,
  .ma-car-row .image-box .ma-card-gallery-single img {
    width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center;
  }

  body.ma-page-catalog .service-block-thirteen .inner-box .image-box .image img,
  body.ma-page-detail .ma-vdp-related .service-block-thirteen .inner-box .image-box .image img {
    height: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
  }

  .ma-car-row .right-box {
    flex-direction: column;
    border-left: none !important;
    border-top: 1px solid var(--ma-line) !important;
    border-radius: 0 0 14px 14px !important;
    align-items: stretch;
  }

  .ma-car-row .content-box-two {
    flex: none;
    width: 100%;
    padding-left: 0 !important;
    padding-top: 12px;
    border-top: 1px solid var(--ma-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .ma-car-row .content-box-two .button {
    margin-top: 0;
  }

  .ma-car-row .inspection-sec {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px !important;
  }

  .ma-car-row .inspection-box .info small {
    white-space: normal;
  }

  body.ma-page-catalog .ma-car-row .ma-photo-badge--eco img,
  body.ma-page-detail .ma-vdp-related .ma-car-row .ma-photo-badge--eco img {
    width: 40px !important;
    max-width: 40px !important;
  }

  body.ma-page-catalog .ma-car-row .ma-photo-badge--brand img,
  body.ma-page-detail .ma-vdp-related .ma-car-row .ma-photo-badge--brand img {
    width: 64px !important;
    max-width: 64px !important;
    height: 12px !important;
    max-height: 12px !important;
  }
}

/* Boxcar theme fuerza cover en .service-block-thirteen */
body.ma-page-catalog .service-block-thirteen .image-box img,
body.ma-page-catalog .service-block-thirteen .inner-box .image-box .image img,
body.ma-page-detail .ma-vdp-related .service-block-thirteen .image-box img,
body.ma-page-detail .ma-vdp-related .service-block-thirteen .inner-box .image-box .image img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
}

