/*
 * GGF 19.11.2026 (GGF-CARD-SPLIT-CTA-20261118, owner variant A): the bar under the photo of a product tile split into two equal
 * parts - "Anteprima" | "Vai al prodotto". Template: catalog/_partials/miniatures/product-quickview.tpl. Every tile of the shop
 * (lists, sections under the product; the home page has its own cards without this bar) - loaded on every page.
 * Desktop (hover): the bar slides up from under the photo on hover / keyboard focus, as the single Anteprima bar did.
 * Touch (no hover; owner 19.11 variant B): the bar is always visible UNDER the photo, the photo is not covered (the eye icon of
 * the parent theme is not printed).
 */
.product-miniature__top { position: relative; }

.ggf-card-actions {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 5;
  display: flex;
  transition: transform .2s ease-in-out;
}
/* keyboard focus inside the tile (as the parent theme: :focus-visible, so a mouse click in the tile does not slide it up) */
.product-miniature__inner:has(:focus-visible) .ggf-card-actions { transform: translateY(-100%); }
/* browsers without :has (Opus R2 A1): focus inside the bar itself always slides it up */
.ggf-card-actions:focus-within { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) {
  .ggf-card-actions { transition: none; }
}
@media (hover: hover) {
  .product-miniature__inner:hover .ggf-card-actions { transform: translateY(-100%); }
}

/* both halves: the look of the former bar (white, body text, no radius); the parent rules of the single button are neutralised */
.ggf-card-actions .ggf-card-actions__item {
  position: static;
  transform: none;
  flex: 1 1 50%;
  width: 50%;
  min-width: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  padding: 1rem .25rem;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background-color: var(--bs-body-bg, #fff);
  color: var(--bs-body-color, #212529);
  font-size: .9375rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.ggf-card-actions .ggf-card-actions__item + .ggf-card-actions__item { border-left: 1px solid #d8d8d8; }
.ggf-card-actions .ggf-card-actions__item:hover,
.ggf-card-actions .ggf-card-actions__item:focus-visible { background-color: #f3f3f3; color: var(--bs-body-color, #212529); text-decoration: none; }
.ggf-card-actions .ggf-card-actions__item:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
.ggf-card-actions .material-icons { font-size: 1.125rem; }
.ggf-card-actions .ggf-card-actions__label { overflow: hidden; text-overflow: ellipsis; }

/* narrow tiles on wider screens (e.g. 4 columns at ~1100-1170 px: ~260 px tile): 14 px and smaller gap, so "Vai al prodotto"
   is never cut; the tile of the theme is a size container (container-type), without it the rule is simply not used */
@container (width < 18rem) {
  .ggf-card-actions .ggf-card-actions__item { font-size: .875rem; gap: .25rem; }
  .ggf-card-actions .material-icons { font-size: 1rem; }
}
/* still narrower tiles (~240 px, e.g. 3 columns at ~800 px without touch): no icons, as on phones */
@container (width < 16rem) {
  .ggf-card-actions .material-icons { display: none; }
}

/* touch screens (owner 19.11, variant B of the phone mock-up): the bar sits UNDER the photo, the photo is not covered; room for it
   is kept INSIDE the photo box, under the photo (the box clips its content - overflow of the theme stays as it is); no hover,
   so always shown */
@media (hover: none) and (pointer: coarse) {
  .product-miniature__top { padding-bottom: 2.25rem; }
  .ggf-card-actions,
  .product-miniature__inner:has(:focus-visible) .ggf-card-actions,
  .ggf-card-actions:focus-within { top: auto; bottom: 0; transform: none; transition: none; }
  .ggf-card-actions .ggf-card-actions__item { display: flex; height: 2.25rem; min-height: 0; padding: 0 .2rem; font-size: .8125rem;
    white-space: nowrap; background-color: var(--bs-body-bg, #fff); border-top: 1px solid #e6e6e6; letter-spacing: .02em; }
}
/* narrow tiles (two columns on phones, ~180 px): labels without icons, 12 px, may wrap to two centred lines (windows without touch) */
@media (max-width: 575.98px) {
  .ggf-card-actions .ggf-card-actions__item { font-size: .75rem; white-space: normal; text-align: center; min-height: 2.5rem; padding: .45rem .2rem; }
  .ggf-card-actions .material-icons { display: none; }
}
/* phones (touch): one line under the photo, 12 px; the narrowest tiles (~160 px, 360 px phones) 11 px */
@media (hover: none) and (pointer: coarse) and (max-width: 575.98px) {
  .ggf-card-actions .ggf-card-actions__item { height: 2.25rem; min-height: 0; padding: 0 .15rem; white-space: nowrap; letter-spacing: 0; }
  @container (width < 10.5rem) {
    .ggf-card-actions .ggf-card-actions__item { font-size: .6875rem; }
  }
  /* the smallest phones (320 px, ~144 px tile): two centred lines inside the same 36 px */
  @container (width < 9.5rem) {
    .ggf-card-actions .ggf-card-actions__item { white-space: normal; text-align: center; line-height: 1.1; }
  }
}
