/* TYPO3 menu content element: Appearance > Layout = "Kachel-Menü".

   Scope:
   - primary rendering: dedicated CASE/FLUIDTEMPLATE for layout 120
   - visual reference: dist/produkte-fuer-sehbehinderte-elektronische-lupen.html
   - max. three cards per row in the editable content area
   - fallback styles remain in place so layout 120 is not left as plain text links
     if TYPO3 renders a standard menu list for an unsupported menu CType. */

.frame-layout-120 .content-menu-tile--product-selection {
  margin: 0 0 3rem;
}

.frame-layout-120 .content-menu-tile--product-selection .product-selection-grid,
.frame-layout-120 .content-menu-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
}

.frame-layout-120 .content-menu-tile--product-selection .product-selection-card {
  min-width: 0;
}

/* Exact card behavior from the static product-selection reference, scoped to
   the editable menu content element. */
.frame-layout-120 .content-menu-tile--product-selection .product-selection-card-link {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  background: #f5f5f5;
  color: #000;
  text-decoration: none;
  overflow: hidden;
  transition: background-color .15s ease, color .15s ease;
  container-type: inline-size;
  container-name: product-selection-card;
}

.frame-layout-120 .content-menu-tile--product-selection .product-selection-card-link:hover,
.frame-layout-120 .content-menu-tile--product-selection .product-selection-card-link:focus {
  background: #dbdbdb;
  color: #000;
  outline: none;
}

.frame-layout-120 .content-menu-tile--product-selection .product-selection-card-body {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 28px 28px 26px 28px;
  padding: 8.75cqw 8.75cqw 8.125cqw 8.75cqw;
  isolation: isolate;
}

.frame-layout-120 .content-menu-tile--product-selection .product-selection-card-top {
  position: relative;
  z-index: 2;
  text-align: center;
}

.frame-layout-120 .content-menu-tile--product-selection .product-selection-card h2 {
  margin: 0 0 12px 0;
  margin-bottom: 3.75cqw;
  font-size: clamp(1.45rem, 1.8vw, 2rem);
  font-size: 7.7cqw;
  line-height: 1.1;
  font-weight: 600;
  text-transform: none;
  color: inherit;
}

.frame-layout-120 .content-menu-tile--product-selection .product-selection-card p {
  margin: 0;
  font-size: 1rem;
  font-size: 4.5cqw;
  line-height: 1.25;
  font-weight: 500;
  color: inherit;
}

.frame-layout-120 .content-menu-tile--product-selection .product-selection-card-media {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.frame-layout-120 .content-menu-tile--product-selection .product-selection-card-media img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center center;
}

.frame-layout-120 .content-menu-tile--product-selection .product-selection-card-link:hover .product-selection-card-media img,
.frame-layout-120 .content-menu-tile--product-selection .product-selection-card-link:focus .product-selection-card-media img {
  filter: none;
}

.frame-layout-120 .content-menu-tile--product-selection .product-selection-card-arrow {
  position: absolute;
  right: 10px;
  right: 3.125cqw;
  bottom: 8px;
  bottom: 2.5cqw;
  z-index: 3;
  width: 44px;
  width: 13.75cqw;
  height: 44px;
  height: 13.75cqw;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fdc815;
  line-height: 1;
}

.frame-layout-120 .content-menu-tile--product-selection .product-selection-card-arrow-svg {
  display: block;
  width: 100%;
  height: 100%;
}

body.theme-mono-light .frame-layout-120 .content-menu-tile--product-selection .product-selection-card-link {
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #000 !important;
}

body.theme-mono-light .frame-layout-120 .content-menu-tile--product-selection .product-selection-card-link:hover,
body.theme-mono-light .frame-layout-120 .content-menu-tile--product-selection .product-selection-card-link:focus {
  background: #000 !important;
  color: #fff !important;
}

body.theme-mono-light .frame-layout-120 .content-menu-tile--product-selection .product-selection-card-arrow {
  color: #000 !important;
}

body.theme-mono-light .frame-layout-120 .content-menu-tile--product-selection .product-selection-card-link:hover .product-selection-card-arrow,
body.theme-mono-light .frame-layout-120 .content-menu-tile--product-selection .product-selection-card-link:focus .product-selection-card-arrow {
  color: #fff !important;
}

body.theme-mono-dark .frame-layout-120 .content-menu-tile--product-selection .product-selection-card-link {
  background: #000 !important;
  color: #fff !important;
  border: 1px solid #fff !important;
}

body.theme-mono-dark .frame-layout-120 .content-menu-tile--product-selection .product-selection-card-media img {
  filter: invert(1);
}

body.theme-mono-dark .frame-layout-120 .content-menu-tile--product-selection .product-selection-card-link:hover,
body.theme-mono-dark .frame-layout-120 .content-menu-tile--product-selection .product-selection-card-link:focus {
  background: #fff !important;
  color: #000 !important;
}

body.theme-mono-dark .frame-layout-120 .content-menu-tile--product-selection .product-selection-card-link:hover .product-selection-card-media img,
body.theme-mono-dark .frame-layout-120 .content-menu-tile--product-selection .product-selection-card-link:focus .product-selection-card-media img {
  filter: none;
}

body.theme-mono-dark .frame-layout-120 .content-menu-tile--product-selection .product-selection-card-arrow {
  color: #fff !important;
}

body.theme-mono-dark .frame-layout-120 .content-menu-tile--product-selection .product-selection-card-link:hover .product-selection-card-arrow,
body.theme-mono-dark .frame-layout-120 .content-menu-tile--product-selection .product-selection-card-link:focus .product-selection-card-arrow {
  color: #000 !important;
}

/* Fallback: style standard Fluid Styled Content menu lists as cards, but only
   inside frame-layout-120. This fallback cannot add page-resource images or
   subtitles; those come from the dedicated CASE renderer above. */
.frame-layout-120.frame-type-menu_pages ul,
.frame-layout-120.frame-type-menu_subpages ul,
.frame-layout-120.frame-type-menu_abstract ul,
.frame-layout-120.frame-type-menu_section_pages ul,
.frame-layout-120.frame-type-menu_sitemap_pages ul,
.frame-layout-120 .ce-menu ul,
.frame-layout-120 .ce-menu,
.frame-layout-120 > ul {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  list-style: none;
  margin: 0 0 3rem;
  padding: 0;
}

.frame-layout-120.frame-type-menu_pages li,
.frame-layout-120.frame-type-menu_subpages li,
.frame-layout-120.frame-type-menu_abstract li,
.frame-layout-120.frame-type-menu_section_pages li,
.frame-layout-120.frame-type-menu_sitemap_pages li,
.frame-layout-120 .ce-menu li,
.frame-layout-120 > ul > li {
  min-width: 0;
  margin: 0;
  padding: 0;
}

.frame-layout-120.frame-type-menu_pages li > a,
.frame-layout-120.frame-type-menu_subpages li > a,
.frame-layout-120.frame-type-menu_abstract li > a,
.frame-layout-120.frame-type-menu_section_pages li > a,
.frame-layout-120.frame-type-menu_sitemap_pages li > a,
.frame-layout-120 .ce-menu li > a,
.frame-layout-120 > ul > li > a {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 28px 28px 72px 28px;
  background: #f5f5f5;
  color: #000;
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
  container-type: inline-size;
  container-name: product-selection-card;
}

.frame-layout-120.frame-type-menu_pages li > a:hover,
.frame-layout-120.frame-type-menu_pages li > a:focus,
.frame-layout-120.frame-type-menu_subpages li > a:hover,
.frame-layout-120.frame-type-menu_subpages li > a:focus,
.frame-layout-120.frame-type-menu_abstract li > a:hover,
.frame-layout-120.frame-type-menu_abstract li > a:focus,
.frame-layout-120.frame-type-menu_section_pages li > a:hover,
.frame-layout-120.frame-type-menu_section_pages li > a:focus,
.frame-layout-120.frame-type-menu_sitemap_pages li > a:hover,
.frame-layout-120.frame-type-menu_sitemap_pages li > a:focus,
.frame-layout-120 .ce-menu li > a:hover,
.frame-layout-120 .ce-menu li > a:focus,
.frame-layout-120 > ul > li > a:hover,
.frame-layout-120 > ul > li > a:focus {
  background: #dbdbdb;
  color: #000;
  outline: none;
  text-decoration: none;
}

.frame-layout-120.frame-type-menu_pages li > a span,
.frame-layout-120.frame-type-menu_subpages li > a span,
.frame-layout-120.frame-type-menu_abstract li > a span,
.frame-layout-120.frame-type-menu_section_pages li > a span,
.frame-layout-120.frame-type-menu_sitemap_pages li > a span,
.frame-layout-120 .ce-menu li > a span,
.frame-layout-120 > ul > li > a span {
  display: block;
  margin: 0;
  font-size: clamp(1.45rem, 1.8vw, 2rem);
  font-size: 7.7cqw;
  line-height: 1.1;
  font-weight: 600;
  text-transform: none;
}

.frame-layout-120.frame-type-menu_pages li > a::after,
.frame-layout-120.frame-type-menu_subpages li > a::after,
.frame-layout-120.frame-type-menu_abstract li > a::after,
.frame-layout-120.frame-type-menu_section_pages li > a::after,
.frame-layout-120.frame-type-menu_sitemap_pages li > a::after,
.frame-layout-120 .ce-menu li > a::after,
.frame-layout-120 > ul > li > a::after {
  content: "";
  position: absolute;
  right: 10px;
  right: 3.125cqw;
  bottom: 8px;
  bottom: 2.5cqw;
  z-index: 3;
  width: 44px;
  width: 13.75cqw;
  height: 44px;
  height: 13.75cqw;
  display: block;
  background-color: #fdc815;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 62 62'%3E%3Cpath d='M30.9996 5.16699C45.2669 5.16699 56.8336 16.7326 56.8336 31C56.8336 45.2674 45.2669 56.833 30.9996 56.833C17.7472 56.8328 6.82801 46.8538 5.34137 34H28.9234L21.1285 41.7949L25.3716 46.0381L38.2877 33.1211L40.4088 31L38.2877 28.8779L25.3716 15.9619L23.2496 18.083L21.1285 20.2041L28.9244 28H5.34137C6.82801 15.1462 17.7472 5.16721 30.9996 5.16699Z' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 62 62'%3E%3Cpath d='M30.9996 5.16699C45.2669 5.16699 56.8336 16.7326 56.8336 31C56.8336 45.2674 45.2669 56.833 30.9996 56.833C17.7472 56.8328 6.82801 46.8538 5.34137 34H28.9234L21.1285 41.7949L25.3716 46.0381L38.2877 33.1211L40.4088 31L38.2877 28.8779L25.3716 15.9619L23.2496 18.083L21.1285 20.2041L28.9244 28H5.34137C6.82801 15.1462 17.7472 5.16721 30.9996 5.16699Z' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
}

body.theme-mono-light .frame-layout-120.frame-type-menu_pages li > a::after,
body.theme-mono-light .frame-layout-120.frame-type-menu_subpages li > a::after,
body.theme-mono-light .frame-layout-120.frame-type-menu_abstract li > a::after,
body.theme-mono-light .frame-layout-120.frame-type-menu_section_pages li > a::after,
body.theme-mono-light .frame-layout-120.frame-type-menu_sitemap_pages li > a::after,
body.theme-mono-light .frame-layout-120 .ce-menu li > a::after,
body.theme-mono-dark .frame-layout-120.frame-type-menu_pages li > a::after,
body.theme-mono-dark .frame-layout-120.frame-type-menu_subpages li > a::after,
body.theme-mono-dark .frame-layout-120.frame-type-menu_abstract li > a::after,
body.theme-mono-dark .frame-layout-120.frame-type-menu_section_pages li > a::after,
body.theme-mono-dark .frame-layout-120.frame-type-menu_sitemap_pages li > a::after,
body.theme-mono-dark .frame-layout-120 .ce-menu li > a::after {
  background-color: currentColor;
}

@media (max-width: 991.98px) {
  .frame-layout-120 .content-menu-tile--product-selection .product-selection-grid,
  .frame-layout-120 .content-menu-tile-grid,
  .frame-layout-120.frame-type-menu_pages ul,
  .frame-layout-120.frame-type-menu_subpages ul,
  .frame-layout-120.frame-type-menu_abstract ul,
  .frame-layout-120.frame-type-menu_section_pages ul,
  .frame-layout-120.frame-type-menu_sitemap_pages ul,
  .frame-layout-120 .ce-menu ul,
  .frame-layout-120 .ce-menu,
  .frame-layout-120 > ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .frame-layout-120 .content-menu-tile--product-selection .product-selection-grid,
  .frame-layout-120 .content-menu-tile-grid,
  .frame-layout-120.frame-type-menu_pages ul,
  .frame-layout-120.frame-type-menu_subpages ul,
  .frame-layout-120.frame-type-menu_abstract ul,
  .frame-layout-120.frame-type-menu_section_pages ul,
  .frame-layout-120.frame-type-menu_sitemap_pages ul,
  .frame-layout-120 .ce-menu ul,
  .frame-layout-120 .ce-menu,
  .frame-layout-120 > ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}
