/* ISACCO | Custom — Category Card
 * Un solo componente; griglia e slider cambiano esclusivamente il contenitore.
 */

body.isacco-frontend-managed .isacco-category-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

body.isacco-frontend-managed .isacco-category-card__shell {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: 205px;
  min-height: 205px;
  overflow: hidden;
  border: 1px solid rgba(126, 52, 16, .3);
  border-radius: 5px 24px 5px 24px;
  background: #fff;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

body.isacco-frontend-managed .isacco-category-card:hover .isacco-category-card__shell,
body.isacco-frontend-managed .isacco-category-card:focus-visible .isacco-category-card__shell {
  transform: translateY(-3px);
  border-color: rgba(126, 52, 16, .44);
  box-shadow: 0 14px 28px rgba(54, 47, 45, .11);
}

body.isacco-frontend-managed .isacco-category-card__visual {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #fff 0 54%, #f1f2f1 54% 100%);
}

body.isacco-frontend-managed .isacco-category-card__image {
  position: absolute;
  inset: 8px 12px 4px;
  display: block;
  max-width: calc(100% - 24px);
  max-height: calc(100% - 12px);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
body.isacco-frontend-managed .isacco-category-card__image > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.isacco-frontend-managed .isacco-category-card__explore {
  position: absolute;
  top: 13px;
  left: 14px;
  z-index: 2;
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: calc(100% - 28px);
  color: #7e3410;
  font: 500 13px/1.2 Montserrat, sans-serif;
  text-shadow: 0 0 2px #fff, 0 0 4px #fff;
}

body.isacco-frontend-managed .isacco-category-card__explore strong {
  font-weight: 600;
}

body.isacco-frontend-managed .isacco-category-card__arrow {
  display: inline-flex;
  flex: 0 0 25px;
  justify-content: center;
  align-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid #7e3410;
  border-radius: 50%;
  font-style: normal;
  font-weight: 500;
}

body.isacco-frontend-managed .isacco-category-card:focus-visible {
  outline: 2px solid #f69f16;
  outline-offset: 3px;
}

body.isacco-frontend-managed .isacco-category-card__footer {
  display: flex;
  box-sizing: border-box;
  min-height: 58px;
  padding: 9px 14px 10px;
  flex: 0 0 58px;
  flex-direction: column;
  justify-content: center;
  border-top: 3px solid #f69f16;
  background: #7e3410;
}

body.isacco-frontend-managed .isacco-category-card__label,
body.isacco-frontend-managed .isacco-category-card__claim {
  display: block;
  font-family: Montserrat, sans-serif;
  font-weight: 600;
}

body.isacco-frontend-managed .isacco-category-card__label {
  margin-bottom: 3px;
  color: #f69f16;
  font-size: 9px;
  letter-spacing: .1em;
}

body.isacco-frontend-managed .isacco-category-card__claim {
  color: #fff;
  font-size: 13px;
  line-height: 1.25;
}

body.isacco-frontend-managed .isacco-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

body.isacco-frontend-managed .isacco-category-slider {
  display: flex;
  gap: 18px;
  overflow-x: auto;
}

body.isacco-frontend-managed .isacco-category-slider > .isacco-category-card {
  flex: 0 0 calc(33.333333% - 12px);
}

body.isacco-home-page .isacco-home-catalog-paths .isacco-category-card__explore > span {
  display: flex;
  gap: 4px;
  align-items: baseline;
  min-width: 0;
  white-space: nowrap;
}

@media (max-width: 960px) {
  body.isacco-frontend-managed .isacco-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  body.isacco-frontend-managed .isacco-category-grid {
    grid-template-columns: 1fr;
  }

  body.isacco-frontend-managed .isacco-category-slider > .isacco-category-card {
    flex-basis: min(78vw, 310px);
  }

  body.isacco-frontend-managed .isacco-category-card__footer {
    min-height: 72px;
    padding-block: 9px;
    flex-basis: 72px;
  }

  body.isacco-frontend-managed .isacco-category-card__explore {
    gap: 9px;
    font-size: 14px;
  }

  body.isacco-frontend-managed .isacco-category-card__arrow {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

}

@media (prefers-reduced-motion: reduce) {
  body.isacco-frontend-managed .isacco-category-card__shell {
    transition: none;
  }

  body.isacco-frontend-managed .isacco-category-card:hover .isacco-category-card__shell,
  body.isacco-frontend-managed .isacco-category-card:focus-visible .isacco-category-card__shell {
    transform: none;
  }
}
