/* ============================================================
   ÁRBOL DE MARCAS SEINTO · DESGUACES LORENZO
   PrestaShop 1.7.7.8
   Identidad visual basada en el logotipo de Lorenzo
   ============================================================ */

:root {
  --asm-primary: #02336B;
  --asm-primary-2: #001F44;
  --asm-accent: #FE001A;
  --asm-accent-dark: #C90019;
  --asm-bg: #F5F7FA;
  --asm-bg-blue: #EEF4FA;
  --asm-bg-red: #FFF1F3;
  --asm-surface: #FFFFFF;
  --asm-text: #2C2C2C;
  --asm-muted: #68717D;
  --asm-border: #DCE3EA;
  --asm-shadow: 0 8px 24px rgba(2, 51, 107, .10);
  --asm-shadow-hover: 0 16px 38px rgba(2, 51, 107, .16);
  --asm-radius: 18px;
}

.asm-container {
  width: min(1500px, calc(100% - 32px));
  margin-inline: auto;
}

.asm-brands,
.asm-models,
.asm-despiece {
  padding: 26px 0 56px;
}

/* ============================================================
   CABECERAS
   ============================================================ */

.asm-section-head {
  position: relative;
  text-align: center;
  margin: 24px 0 30px;
  padding: 30px 20px 28px;
  border: 1px solid var(--asm-border);
  border-radius: 24px;
  background: var(--asm-surface);
  box-shadow: var(--asm-shadow);
  overflow: hidden;
}

.asm-section-head::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--asm-primary) 0%,
    var(--asm-primary) 72%,
    var(--asm-accent) 72%,
    var(--asm-accent) 100%
  );
}

.asm-section-head::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -95px;
  top: -105px;
  border-radius: 50%;
  background: rgba(254, 0, 26, .045);
  pointer-events: none;
}

.asm-section-head h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  line-height: 1.12;
  color: var(--asm-primary);
  margin: 8px 0 12px;
  font-weight: 800;
}

.asm-section-head p {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  color: var(--asm-muted);
  line-height: 1.65;
  font-size: 1rem;
}

.asm-kicker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--asm-bg-blue);
  color: var(--asm-primary);
  font-weight: 800;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.asm-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--asm-accent);
}

/* ============================================================
   GRID DE MARCAS Y MODELOS
   ============================================================ */

.asm-brand-grid,
.asm-model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.asm-brand-card,
.asm-model-card {
  display: flex;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 178px;
  padding: 18px 14px;
  border: 1px solid var(--asm-border);
  border-radius: var(--asm-radius);
  background: var(--asm-surface);
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(44, 44, 44, .05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  overflow: hidden;
}

.asm-brand-card::before,
.asm-model-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 0;
  background: var(--asm-accent);
  transition: height .2s ease;
}

.asm-brand-card:hover,
.asm-model-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--asm-shadow-hover);
  border-color: rgba(2, 51, 107, .38);
  text-decoration: none;
}

.asm-brand-card:hover::before,
.asm-model-card:hover::before {
  height: 100%;
}

.asm-brand-card:focus-visible,
.asm-model-card:focus-visible {
  outline: 3px solid rgba(254, 0, 26, .18);
  outline-offset: 3px;
}

.asm-brand-card img {
  max-width: 136px;
  max-height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 7px 10px rgba(2, 51, 107, .08));
}

.asm-model-card img {
  width: 100%;
  height: 126px;
  object-fit: contain;
}

.asm-card-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 132px;
}

.asm-brand-card span,
.asm-model-card span {
  font-weight: 800;
  color: var(--asm-primary);
  text-transform: uppercase;
  font-size: .94rem;
  line-height: 1.25;
}

.asm-brand-card small,
.asm-model-card small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--asm-bg-blue);
  color: var(--asm-primary);
  border: 1px solid rgba(2, 51, 107, .08);
  font-weight: 800;
  font-size: .78rem;
}

.asm-brand-logo {
  position: relative;
  z-index: 1;
  width: 140px;
  height: 96px;
  object-fit: contain;
  margin: 2px auto 8px;
  filter: drop-shadow(0 8px 14px rgba(2, 51, 107, .10));
}

/* ============================================================
   BREADCRUMB
   ============================================================ */

.asm-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 4px 0 18px;
  color: var(--asm-muted);
  font-size: .92rem;
}

.asm-breadcrumb a {
  color: var(--asm-primary);
  text-decoration: none;
  font-weight: 700;
}

.asm-breadcrumb a:hover {
  color: var(--asm-accent);
  text-decoration: none;
}

/* ============================================================
   HERO MARCA / MODELO
   ============================================================ */

.asm-hero-images {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 22px;
}

.asm-hero-images img {
  width: 140px;
  height: 96px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  padding: 10px;
  border: 1px solid var(--asm-border);
  box-shadow: 0 10px 22px rgba(2, 51, 107, .06);
}

/* ============================================================
   CATEGORÍAS DEL DESPIECE
   ============================================================ */

.asm-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin: 32px 0;
}

.asm-category-group {
  position: relative;
  padding: 20px;
  border: 1px solid var(--asm-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(44, 44, 44, .05);
  overflow: hidden;
}

.asm-category-group::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: var(--asm-primary);
}

.asm-category-group h2 {
  font-size: 1.05rem;
  color: var(--asm-primary);
  margin: 0 0 14px;
  text-transform: uppercase;
  font-weight: 900;
}

.asm-category-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.asm-category-group li + li {
  margin-top: 6px;
}

.asm-category-group a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--asm-bg);
  color: var(--asm-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.asm-category-group a:hover {
  background: var(--asm-bg-blue);
  color: var(--asm-primary);
  border-left-color: var(--asm-accent);
  text-decoration: none;
}

.asm-category-name {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.asm-category-oem {
  font-style: normal;
  font-size: .78rem;
  font-weight: 800;
  color: var(--asm-primary);
  line-height: 1.2;
}

.asm-category-group strong {
  color: var(--asm-accent);
  white-space: nowrap;
}

/* ============================================================
   MENSAJES / TEXTO SEO
   ============================================================ */

.asm-empty {
  grid-column: 1 / -1;
  padding: 20px;
  border-radius: 14px;
  background: var(--asm-bg-red);
  color: #8F1020;
  border: 1px solid rgba(254, 0, 26, .22);
}

.asm-seo-text {
  position: relative;
  margin: 34px 0 12px;
  padding: 24px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--asm-border);
  box-shadow: 0 10px 24px rgba(44, 44, 44, .05);
  overflow: hidden;
}

.asm-seo-text::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 100%;
  background: var(--asm-accent);
}

.asm-seo-text h2 {
  font-size: 1.35rem;
  margin: 0 0 10px;
  color: var(--asm-primary);
  font-weight: 900;
}

.asm-seo-text p {
  margin: 0;
  color: var(--asm-muted);
  line-height: 1.65;
}

/* ============================================================
   PRODUCTOS
   ============================================================ */

.asm-products {
  padding: 26px 0 56px;
}

.asm-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 22px;
  margin: 30px 0 36px;
}

.asm-product-card {
  display: flex;
  position: relative;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--asm-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(44, 44, 44, .06);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.asm-product-card::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--asm-primary) 0 78%, var(--asm-accent) 78% 100%);
}

.asm-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--asm-shadow-hover);
  border-color: rgba(2, 51, 107, .38);
}

.asm-product-img {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background: var(--asm-bg);
  border-bottom: 1px solid var(--asm-border);
  padding: 12px;
}

.asm-product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.asm-product-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  flex: 1;
}

.asm-product-body h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--asm-primary);
}

.asm-product-body h2 a {
  color: inherit;
  text-decoration: none;
}

.asm-product-body h2 a:hover {
  color: var(--asm-accent);
  text-decoration: none;
}

.asm-product-ref {
  margin: 0;
  text-align: center;
  color: var(--asm-muted);
  font-size: .9rem;
  min-height: 22px;
}

.asm-product-oem {
  margin: 0;
  text-align: center;
  color: var(--asm-primary);
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.35;
}

.asm-product-desc {
  margin: 0;
  color: var(--asm-muted);
  font-size: .86rem;
  line-height: 1.45;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.asm-product-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--asm-primary);
  font-size: .86rem;
}

.asm-product-meta span {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--asm-bg-blue);
  border: 1px solid rgba(2, 51, 107, .08);
}

.asm-product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--asm-border);
}

.asm-product-footer strong {
  font-size: 1.25rem;
  color: var(--asm-text);
  font-weight: 900;
  white-space: nowrap;
}

.asm-product-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 12px;
  background: var(--asm-primary);
  color: var(--asm-surface) !important;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(2, 51, 107, .15);
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.asm-product-button:hover {
  background: var(--asm-accent);
  color: #fff !important;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(254, 0, 26, .20);
}

.asm-product-button:focus-visible {
  outline: 3px solid rgba(254, 0, 26, .18);
  outline-offset: 3px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .asm-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .asm-container {
    width: min(100% - 20px, 1180px);
  }

  .asm-brands,
  .asm-models,
  .asm-despiece,
  .asm-products {
    padding: 18px 0 38px;
  }

  .asm-section-head {
    padding: 22px 14px;
    margin: 14px 0 20px;
    border-radius: 18px;
  }

  .asm-brand-grid,
  .asm-model-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .asm-brand-card,
  .asm-model-card {
    min-height: 150px;
    border-radius: 14px;
    padding: 14px 10px;
  }

  .asm-brand-card img {
    max-width: 112px;
    max-height: 68px;
  }

  .asm-model-card img {
    height: 96px;
  }

  .asm-card-img {
    height: 100px;
  }

  .asm-category-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .asm-hero-images {
    gap: 12px;
  }

  .asm-hero-images img {
    width: 110px;
    height: 82px;
  }

  .asm-brand-card span,
  .asm-model-card span {
    font-size: .82rem;
  }

  .asm-products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .asm-product-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .asm-product-button {
    width: 100%;
  }
}
