/* =========================================================================
   AC Product Slider — stile front office
   Colori brand iniettati via variabili: --acps-primary / --acps-accent
   ========================================================================= */

.acps {
  --acps-primary: #173677;
  --acps-accent: #efe8db;
  --acps-text: #2a2f3a;
  --acps-muted: #7b8190;
  --acps-card-radius: 14px;
  --acps-shadow: 0 10px 30px rgba(23, 54, 119, .10);
  --acps-shadow-hover: 0 18px 44px rgba(23, 54, 119, .18);

  position: relative;
  padding: 48px 0 56px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(239, 232, 219, .55) 0%, rgba(239, 232, 219, 0) 60%),
    #ffffff;
  overflow: hidden;
}

/* Larghezza piena edge-to-edge anche dentro container del tema */
.acps--full {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.acps__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Intestazione ---------- */
.acps__heading {
  text-align: center;
  margin-bottom: 34px;
}

.acps__subtitle {
  display: block;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--acps-primary);
  opacity: .7;
  margin-bottom: 6px;
}

.acps__title {
  margin: 0;
  font-style: italic;
  font-weight: 800;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  color: var(--acps-primary);
}

.acps__rule {
  display: block;
  width: 64px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 4px;
  background: var(--acps-primary);
}

/* ---------- Swiper / area card ---------- */
.acps__swiper {
  position: relative;
  padding: 6px 4px 8px;
}

.acps .swiper-slide {
  height: auto;
  display: flex;
}

/* ---------- Card prodotto ---------- */
.acps-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #fff;
  border: 1px solid rgba(23, 54, 119, .08);
  border-radius: var(--acps-card-radius);
  box-shadow: var(--acps-shadow);
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.acps-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--acps-shadow-hover);
  border-color: rgba(23, 54, 119, .16);
}

.acps-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--acps-accent);
  overflow: hidden;
}

.acps-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
  transition: transform .5s ease;
}

.acps-card:hover .acps-card__media img {
  transform: scale(1.05);
}

.acps-card__noimg {
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(23,54,119,.06), rgba(23,54,119,0)),
    var(--acps-accent);
}

.acps-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 10px;
  padding: 18px 18px 20px;
  text-align: center;
}

.acps-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  min-height: 2.7em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acps-card__title a {
  color: var(--acps-text);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.acps-card__title a:hover {
  color: var(--acps-primary);
}

.acps-card__price {
  font-size: 20px;
  font-weight: 800;
  color: var(--acps-primary);
}

/* ---------- Pulsante "SCOPRI IL PRODOTTO" ---------- */
.acps-card__btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--acps-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--acps-primary);
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}

.acps-card__btn:hover,
.acps-card__btn:focus {
  background: var(--acps-accent);
  color: var(--acps-primary);
  border-color: var(--acps-accent);
}

.acps-card__arrow {
  transition: transform .25s ease;
}

.acps-card__btn:hover .acps-card__arrow {
  transform: translateX(3px);
}

/* ---------- Frecce di navigazione ---------- */
.acps .swiper-button-prev,
.acps .swiper-button-next {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 18px rgba(23, 54, 119, .18);
  color: var(--acps-primary);
  transition: background .25s ease, color .25s ease, transform .2s ease;
  margin-top: -22px;
}

.acps .swiper-button-prev:hover,
.acps .swiper-button-next:hover {
  background: var(--acps-primary);
  color: #fff;
}

.acps .swiper-button-prev::after,
.acps .swiper-button-next::after {
  font-size: 16px;
  font-weight: 800;
}

.acps .swiper-button-disabled {
  opacity: 0;
  pointer-events: none;
}

/* ---------- Paginazione (puntini) ---------- */
.acps__pagination {
  position: static;
  margin-top: 22px;
  text-align: center;
}

.acps .swiper-pagination-bullet {
  width: 9px;
  height: 9px;
  background: var(--acps-primary);
  opacity: .25;
  transition: opacity .25s ease, width .25s ease, border-radius .25s ease;
}

.acps .swiper-pagination-bullet-active {
  opacity: 1;
  width: 26px;
  border-radius: 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  .acps { padding: 34px 0 40px; }
  .acps__inner { padding: 0 16px; }
  .acps__heading { margin-bottom: 24px; }
  .acps .swiper-button-prev,
  .acps .swiper-button-next { display: none; }
  .acps-card__title { font-size: 15px; }
}

/* =========================================================================
   LAYOUT BANNER FULL-WIDTH (1 prodotto alla volta)
   ========================================================================= */
.acps--banner {
  padding: 0;
  background: #fff;
}

.acps--banner .acps__inner {
  padding: 0;
}

.acps--banner.acps--full .acps__inner {
  max-width: none;
}

.acps--banner .acps__swiper {
  padding: 0;
}

.acps--banner .swiper-slide {
  display: block;
}

.acps-banner {
  display: flex;
  align-items: stretch;
  min-height: clamp(360px, 40vw, 520px);
  background: #fff;
}

/* Colonna immagine con sfondo sfocato dello stesso prodotto */
.acps-banner__media {
  position: relative;
  flex: 0 0 56%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--acps-accent);
  text-decoration: none;
}

.acps-banner__bg {
  position: absolute;
  inset: -12%;
  background-size: cover;
  background-position: center;
  filter: blur(30px) saturate(1.15);
  transform: scale(1.18);
  opacity: .5;
}

.acps-banner__img {
  position: relative;
  z-index: 1;
  max-width: 70%;
  max-height: 78%;
  object-fit: contain;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 26px 60px rgba(15, 30, 70, .22);
  transition: box-shadow .4s ease;
}

.acps-banner__media:hover .acps-banner__img {
  box-shadow: 0 34px 80px rgba(15, 30, 70, .30);
}

/* Colonna contenuto */
.acps-banner__content {
  position: relative;
  flex: 1 1 44%;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 40px clamp(28px, 4.5vw, 72px);
  background: #efe8db !important;
}

/* Cerchio decorativo sfumato per dare profondità */
.acps-banner__content::before {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -140px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(23, 54, 119, .10), rgba(23, 54, 119, 0) 70%);
  pointer-events: none;
}

.acps-banner__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

/* Barretta accento sopra il titolo */
.acps-banner__bar {
  display: block;
  width: 54px;
  height: 4px;
  border-radius: 4px;
  background: var(--acps-primary);
}

/* Titolo ad altezza fissa: riserva 2 righe, troncamento elegante */
.acps-banner__title {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 34px);
  font-weight: 800;
  font-style: italic;
  line-height: 1.22;
  color: var(--acps-text);
  min-height: calc(2 * 1.22em);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.acps-banner__title a {
  color: inherit;
  text-decoration: none;
}

.acps-banner__title a:hover {
  color: var(--acps-primary);
}

.acps-banner__price {
  font-size: clamp(28px, 3.4vw, 48px);
  font-weight: 800;
  line-height: 1;
  color: var(--acps-primary);
}

/* Riga "Lo trovi nella categoria ..." */
.acps-banner__cat {
  margin: 0;
  font-size: 15px;
  color: var(--acps-muted);
}

.acps-banner__cat a,
.acps-banner__cat span {
  font-weight: 700;
  color: var(--acps-primary);
  text-decoration: none;
}

.acps-banner__cat a {
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}

.acps-banner__cat a:hover {
  border-color: var(--acps-primary);
}

.acps-banner__btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 15px 30px;
  border-radius: 999px;
  background: var(--acps-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--acps-primary);
  transition: background .25s ease, color .25s ease, transform .2s ease;
}

.acps-banner__btn:hover,
.acps-banner__btn:focus {
  background: var(--acps-accent);
  color: var(--acps-primary);
  border-color: var(--acps-accent);
  transform: translateY(-1px);
}

.acps-banner__btn svg {
  transition: transform .25s ease;
}

.acps-banner__btn:hover svg {
  transform: translateX(3px);
}

.acps-banner .acps-card__noimg {
  width: 100%;
  height: 100%;
}

/* Frecce squadrate stile "Slider Revolution" + paginazione sovrapposta */
.acps--banner .swiper-button-prev,
.acps--banner .swiper-button-next {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  margin-top: -24px;
}

.acps--banner .swiper-button-prev { left: 18px; }
.acps--banner .swiper-button-next { right: 18px; }

.acps--banner .acps__pagination {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  margin: 0;
  z-index: 3;
}

/* Responsive banner: impilato su mobile/tablet stretto */
@media (max-width: 860px) {
  .acps-banner {
    flex-direction: column;
    min-height: 0;
  }
  .acps-banner__media {
    flex: none;
    width: 100%;
    height: clamp(220px, 52vw, 300px);
  }
  .acps-banner__img {
    max-width: 62%;
    max-height: 84%;
  }
  .acps-banner__content {
    padding: 26px 20px 48px;
  }
  .acps-banner__inner {
    align-items: center;
    text-align: center;
    gap: 12px;
  }
  .acps-banner__title {
    /* su mobile lasciamo respirare: niente altezza fissa a 2 righe */
    min-height: 0;
  }
  .acps-banner__btn {
    align-self: center;
  }
  .acps-banner__content::before {
    display: none;
  }
  .acps--banner .swiper-button-prev,
  .acps--banner .swiper-button-next {
    display: none;
  }
}

/* =========================================================================
   ANIMAZIONI DI ENTRATA (solo layout banner, sulla slide attiva)
   Sequenza: barra -> titolo -> prezzo -> categoria -> pulsante
   ========================================================================= */
@media (prefers-reduced-motion: no-preference) {
  .acps--banner .swiper-initialized .acps-banner__inner > * {
    opacity: 0;
    transform: translateY(16px);
  }

  .acps--banner .swiper-initialized .acps-banner__img {
    opacity: 0;
    transform: scale(.94);
  }

  .acps--banner .swiper-initialized .swiper-slide-active .acps-banner__inner > * {
    animation: acpsRise .6s cubic-bezier(.22, .61, .36, 1) forwards;
  }

  .acps--banner .swiper-initialized .swiper-slide-active .acps-banner__img {
    animation: acpsZoom .8s cubic-bezier(.22, .61, .36, 1) forwards;
  }

  .acps--banner .swiper-initialized .swiper-slide-active .acps-banner__inner > *:nth-child(1) { animation-delay: .05s; }
  .acps--banner .swiper-initialized .swiper-slide-active .acps-banner__inner > *:nth-child(2) { animation-delay: .14s; }
  .acps--banner .swiper-initialized .swiper-slide-active .acps-banner__inner > *:nth-child(3) { animation-delay: .23s; }
  .acps--banner .swiper-initialized .swiper-slide-active .acps-banner__inner > *:nth-child(4) { animation-delay: .32s; }
  .acps--banner .swiper-initialized .swiper-slide-active .acps-banner__inner > *:nth-child(5) { animation-delay: .41s; }
}

@keyframes acpsRise {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes acpsZoom {
  to { opacity: 1; transform: scale(1); }
}
