/* Páginas interiores Moralauto — heroes, sticky, about/taller */

/* Sticky fix: el theme pone overflow:hidden en .boxcar-wrapper */
body.ma-page-catalog .boxcar-wrapper,
body.ma-page-detail .boxcar-wrapper,
body.ma-page-about .boxcar-wrapper {
  overflow: visible !important;
}

/* ---------- HERO CATÁLOGO ---------- */
.ma-catalog-hero {
  position: relative;
  margin-top: 0;
  padding: calc(var(--ma-header-h) + 56px) 0 72px;
  background:
    linear-gradient(135deg, rgba(5, 11, 32, 0.92) 0%, rgba(26, 39, 68, 0.88) 45%, rgba(64, 95, 242, 0.75) 100%),
    url("../images/moralauto_oficina/DSC02832.web.jpg") center / cover no-repeat;
  color: #fff;
  overflow: hidden;
}

.ma-catalog-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.12), transparent 45%);
  pointer-events: none;
}

.ma-catalog-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.ma-catalog-hero .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  font-size: 13px;
}

.ma-catalog-hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.ma-catalog-hero .breadcrumb a:hover {
  color: #fff;
}

.ma-catalog-hero .breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  opacity: 0.45;
}

.ma-catalog-hero h1 {
  margin: 0 0 10px;
  font-family: var(--title-font);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff !important;
}

.ma-catalog-hero-lead {
  max-width: 560px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  line-height: 1.55;
}

.ma-catalog-hero-search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 720px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.ma-catalog-hero-search input {
  flex: 1 1 220px;
  min-width: 0;
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--ma-line);
  border-radius: 12px;
  font-size: 15px;
}

.ma-catalog-hero-search button {
  height: 50px;
  padding: 0 24px;
  border: none;
  border-radius: 12px;
  background: var(--ma-accent);
  color: #fff;
  font-family: var(--title-font);
  font-weight: 700;
  cursor: pointer;
}

.ma-catalog-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 28px;
}

.ma-catalog-hero-stats div strong {
  display: block;
  font-family: var(--title-font);
  font-size: 1.5rem;
  font-weight: 800;
}

.ma-catalog-hero-stats div span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.ma-catalog-section {
  padding: 40px 0 64px;
}

/* ---------- DETALLE STICKY ---------- */
.ma-detail-page .inventory-section {
  overflow: visible !important;
  border-radius: 0;
  padding-top: 0;
}

.ma-detail-layout {
  align-items: flex-start !important;
}

.ma-detail-sticky-col {
  align-self: flex-start;
}

.ma-detail-sidebar {
  position: sticky !important;
  top: calc(var(--ma-header-h) + 16px) !important;
  z-index: 50;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.ma-detail-sidebar::-webkit-scrollbar {
  width: 6px;
}

/* ---------- HERO PÁGINAS (taller / conocenos) ---------- */
.ma-page-hero {
  position: relative;
  margin-top: 0;
  min-height: calc(420px + var(--ma-header-h));
  display: flex;
  align-items: flex-end;
  padding: var(--ma-header-h) 0 56px;
  color: #fff;
  overflow: hidden;
}

.ma-page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.ma-page-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 11, 32, 0.55) 0%, rgba(5, 11, 32, 0.82) 55%, rgba(5, 11, 32, 0.95) 100%),
    linear-gradient(90deg, rgba(5, 11, 32, 0.85) 0%, transparent 60%);
}

.ma-page-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 0;
}

.ma-page-hero .eyebrow {
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 12px;
}

.ma-page-hero h1 {
  margin: 0 0 14px;
  font-family: var(--title-font);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: #fff !important;
  max-width: 720px;
}

.ma-page-hero-lead {
  max-width: 560px;
  margin: 0 0 24px;
  font-size: 1.08rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

.ma-page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ma-page-stats {
  background: var(--ma-ink);
  color: #fff;
  padding: 28px 0;
}

.ma-page-stats-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.ma-page-stats-grid strong {
  display: block;
  font-family: var(--title-font);
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
}

.ma-page-stats-grid span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.62);
}

.ma-page-section {
  padding: 80px 0;
}

.ma-page-section.alt {
  background: var(--ma-paper);
}

.ma-page-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.ma-page-split h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.ma-page-split p {
  color: var(--ma-muted);
  line-height: 1.65;
  margin-bottom: 14px;
}

.ma-page-checklist {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}

.ma-page-checklist li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--ma-ink-soft);
}

.ma-page-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ma-accent);
  font-weight: 800;
}

.ma-page-image {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(5, 11, 32, 0.12);
}

.ma-page-image img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  display: block;
}

.ma-service-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.ma-service-card {
  background: #fff;
  border: 1px solid var(--ma-line);
  border-radius: 16px;
  padding: 28px 24px;
  transition: transform 0.3s var(--ma-ease), box-shadow 0.3s var(--ma-ease);
}

.ma-service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(5, 11, 32, 0.08);
}

.ma-service-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(64, 95, 242, 0.1);
  color: var(--ma-accent);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.ma-service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.ma-service-card p {
  color: var(--ma-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

.ma-team-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.ma-team-card {
  text-align: center;
}

.ma-team-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 14px;
}

.ma-team-card h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.ma-team-card p {
  color: var(--ma-muted);
  font-size: 0.9rem;
}

.ma-gallery-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ma-gallery-grid img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(5, 11, 32, 0.08);
}

.ma-page-cta {
  max-width: 1280px;
  margin: 0 auto 80px;
  padding: 0 24px;
}

.ma-page-cta-inner {
  background: linear-gradient(135deg, #0a0f1c, #1a2744 55%, #405ff2);
  border-radius: 20px;
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #fff;
}

.ma-page-cta-inner h2 {
  color: #fff !important;
  margin-bottom: 8px;
}

.ma-page-cta-inner p {
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  max-width: 480px;
}

.ma-section-head-center {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
  padding: 0 24px;
}

.ma-section-head-center h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  margin-bottom: 10px;
}

.ma-section-head-center p {
  color: var(--ma-muted);
}

.ma-related-section {
  padding: 60px 0 80px;
  background: var(--ma-paper);
}

@media (max-width: 991px) {
  .ma-page-split,
  .ma-service-grid,
  .ma-team-grid {
    grid-template-columns: 1fr;
  }

  .ma-page-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ma-gallery-grid {
    grid-template-columns: 1fr;
  }

  .ma-detail-sidebar {
    position: static !important;
    max-height: none;
    overflow: visible;
  }

  .ma-page-cta-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
  }

  .ma-catalog-hero {
    padding: calc(var(--ma-header-h) + 40px) 0 48px;
  }
}
