/*
  Capri Blu Totem Tablet - v0.4.17
  Menu reparti 3x3: tutti i nove reparti visibili senza carosello.
*/

#screen-categories .category-gallery.department-grid {
  width: 100% !important;
  max-width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
  padding: 10px 2px 18px !important;
  overflow: visible !important;
  align-items: stretch !important;
}

#screen-categories .department-grid .department-carousel-card,
#screen-categories .department-grid .department-carousel-card.is-center,
#screen-categories .department-grid .department-carousel-card:not(.is-center) {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: 100% !important;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

#screen-categories .department-grid .department-carousel-card > button {
  width: 100% !important;
  height: 100% !important;
  min-height: 280px !important;
  border-radius: 22px !important;
}

#screen-categories .department-grid .department-carousel-photo {
  min-height: 280px !important;
  height: 100% !important;
  aspect-ratio: 1.18 / 1 !important;
  background-size: cover !important;
  background-position: center !important;
}

#screen-categories .department-grid .department-carousel-copy {
  padding: 22px 22px 20px !important;
}

#screen-categories .department-grid .department-carousel-copy h3 {
  margin: 4px 0 6px !important;
  font-size: clamp(1.65rem, 2.2vw, 2.45rem) !important;
  line-height: 1.02 !important;
}

#screen-categories .department-grid .department-carousel-copy p {
  min-height: 2.7em !important;
  margin: 0 0 14px !important;
  font-size: .98rem !important;
}

#screen-categories .department-grid .department-carousel-copy strong {
  min-height: 40px !important;
  padding: 8px 15px !important;
  font-size: .92rem !important;
}

/* Lascia spazio sufficiente per vedere bene tutte e 3 le righe con scroll verticale naturale. */
#screen-categories .gallery-shell {
  overflow: visible !important;
}

@media (max-width: 1050px) {
  #screen-categories .category-gallery.department-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 680px) {
  #screen-categories .category-gallery.department-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  #screen-categories .department-grid .department-carousel-photo {
    min-height: 320px !important;
    aspect-ratio: 1 / 1 !important;
  }
}
