/**
 * ToBePolo discovery cards.
 * Canonical owner for the experience grid and full-card swipe.
 */

:root {
  --tbp-discovery-green: var(--tbp-green, #084828);
  --tbp-discovery-radius: 24px;
  --tbp-discovery-gap: 12px;
  --tbp-discovery-grid-max: 1120px;
  --tbp-discovery-portrait: 56px;
}

html body.tbp-core-home #main,
html body.tbp-core-home #tbp-results-container {
  width: 100% !important;
  max-width: none !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

html body.tbp-core-home #tbp-results-container {
  display: block !important;
  grid-template-columns: none !important;
}

html body #tbp-results-container .grid-risultati {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-flow: dense !important;
  gap: var(--tbp-discovery-gap) !important;
  width: 100% !important;
  max-width: 720px !important;
  margin: 0 auto !important;
  padding: 0 12px 16px !important;
  box-sizing: border-box !important;
}

html body.tbp-core-home #tbp-results-container .grid-risultati {
  max-width: min(100%, 720px) !important;
}

html body.tbp-core-home #tbp-results-container .tbp-exp-card--wide {
  grid-column: span 2 !important;
  grid-row: span 1 !important;
}

html body.tbp-core-home #tbp-results-container .tbp-exp-card--tall {
  grid-column: span 1 !important;
  grid-row: span 2 !important;
  height: auto !important;
}

html body.tbp-core-home #tbp-results-container .tbp-exp-card--giant {
  grid-column: span 2 !important;
  grid-row: span 2 !important;
  height: auto !important;
}

html body.tbp-core-home #tbp-results-container .tbp-exp-card--wide .tbp-exp-card__media {
  aspect-ratio: 5 / 4 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

html body.tbp-core-home #tbp-results-container .tbp-exp-card--tall .tbp-exp-card__media {
  aspect-ratio: 3 / 10 !important;
  height: auto !important;
  min-height: 0 !important;
}

html body.tbp-core-home #tbp-results-container .tbp-exp-card--giant .tbp-exp-card__media {
  aspect-ratio: 3 / 5 !important;
  height: auto !important;
  min-height: 0 !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--wide {
  --tbp-discovery-portrait: 56px;
  --tbp-discovery-title-size: clamp(1.3rem, 2.5vw, 1.6rem);
  --tbp-discovery-price-size: clamp(1.35rem, 2.3vw, 1.6rem);
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--tall {
  --tbp-discovery-portrait: 56px;
  --tbp-discovery-title-size: clamp(1.25rem, 2vw, 1.45rem);
  --tbp-discovery-price-size: clamp(1.3rem, 1.9vw, 1.45rem);
  --tbp-discovery-title-lines: 8;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--giant {
  --tbp-discovery-portrait: 56px;
  --tbp-discovery-title-size: clamp(1.6rem, 3vw, 2.1rem);
  --tbp-discovery-price-size: clamp(1.6rem, 2.8vw, 2rem);
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--wide .tbp-exp-card__tag,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--tall .tbp-exp-card__tag,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--wide .tbp-exp-card__place-bit,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--tall .tbp-exp-card__place-bit {
  font-size: 0.74rem !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--giant .tbp-exp-card__tag,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--giant .tbp-exp-card__place-bit,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--giant .tbp-exp-card__maker-name {
  text-shadow: 0 1px 3px #000, 0 2px 8px rgba(0, 0, 0, .85) !important;
  font-size: 0.86rem !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--giant .tbp-exp-card__maker-name {
  text-shadow: 0 1px 3px #000, 0 2px 8px rgba(0, 0, 0, .85) !important;
  max-width: var(--tbp-discovery-portrait, 88px) !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card,
html body :is(#tbp-results-container, .tbp-exp-card-scope) article.card-esperienza,
html body :is(#tbp-results-container, .tbp-exp-card-scope) a.card-esperienza {
  position: relative !important;
  display: block !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  grid-column: auto;
  grid-row: auto;
  border: 0 !important;
  border-radius: var(--tbp-discovery-radius) !important;
  outline: 0 !important;
  background: #111 !important;
  box-shadow: none !important;
  color: #fff !important;
  text-decoration: none !important;
  cursor: grab !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: rgba(8, 72, 40, 0.18);
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card.is-dragging {
  cursor: grabbing !important;
  user-select: none !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card:focus-visible {
  outline: 3px solid rgba(201, 162, 39, 0.62) !important;
  outline-offset: 3px !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__media {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 3 / 5 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: inherit !important;
  background: #111 !important;
  isolation: isolate !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__track {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  flex-flow: row nowrap !important;
  width: 100% !important;
  height: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border-radius: inherit !important;
  scroll-snap-type: x mandatory !important;
  overscroll-behavior-x: contain !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none !important;
  transform: none !important;
  transition: none !important;
}

/* JS prende l'aggancio solo a inerzia finita; senza JS resta lo snap nativo. */
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__track.has-soft-snap {
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__track::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card.is-dragging .tbp-exp-card__track {
  transition: none !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__slide {
  position: relative !important;
  scroll-snap-align: start !important;
  scroll-snap-stop: always !important;
  flex: 0 0 100% !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  border-radius: inherit !important;
  background: var(--tbp-surface-sage, #f4f7f5) !important;
  color: inherit !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__slide--empty {
  background: linear-gradient(180deg, #1a3d2a, #0d2418) !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card::before,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card::after,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__media::before,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__media::after,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__slide::before,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__slide::after,
html body :is(#tbp-results-container, .tbp-exp-card-scope) article.card-esperienza::before,
html body :is(#tbp-results-container, .tbp-exp-card-scope) article.card-esperienza::after {
  content: none !important;
  display: none !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__slide > img,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__slide video,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__slide iframe,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__slide .tbp-card-thumb__embed,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__slide .tbp-card-thumb__player,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card .thumb,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card .thumb img {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  border: 0 !important;
  border-radius: inherit !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: cover !important;
  object-position: center 30% !important;
  pointer-events: none !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
}

html body .tbp-exp-card video::-webkit-media-controls,
html body .tbp-exp-card video::-webkit-media-controls-enclosure,
html body .tbp-exp-card video::-webkit-media-controls-panel,
html body .tbp-exp-card video::-webkit-media-controls-start-playback-button,
html body .tbp-exp-card video::-webkit-media-controls-overlay-play-button,
html body .tbp-card-thumb__player::-webkit-media-controls,
html body .tbp-card-thumb__player::-webkit-media-controls-enclosure,
html body .tbp-card-thumb__player::-webkit-media-controls-start-playback-button {
  display: none !important;
  opacity: 0 !important;
  -webkit-appearance: none !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__slide .tbp-card-thumb__embed,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__slide--video video,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__slide--video .tbp-card-thumb__player,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__slide--video iframe {
  z-index: 1 !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__shade {
  /* Head/info own the text scrims: do not darken the media twice. */
  display: none !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__chrome,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__chrome-actions,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__wish,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card .tbp-wishlist-btn,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__cal,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__dates,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-verified-badge {
  display: none !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__dots {
  position: absolute !important;
  top: 8px !important;
  left: 50% !important;
  z-index: 7 !important;
  display: flex !important;
  justify-content: center !important;
  gap: 5px !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
  transform: translateX(-50%) !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__dot {
  width: 5px !important;
  height: 5px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.42) !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__dot.is-on {
  width: 14px !important;
  background: #fff !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__head {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  z-index: 5 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 26px 10px 16px !important;
  overflow: visible !important;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.26) 55%, transparent 100%) !important;
  pointer-events: none !important;
  box-sizing: border-box !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__info {
  position: absolute !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  z-index: 4 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  flex: 0 0 auto !important;
  gap: 6px !important;
  width: 100% !important;
  max-height: none !important;
  height: auto !important;
  margin: 0 !important;
  padding: 10px 8px 10px !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  isolation: isolate !important;
  color: #fff !important;
  text-align: left !important;
  cursor: grab !important;
  pointer-events: auto !important;
  box-sizing: border-box !important;
  touch-action: manipulation !important;
}

/* One soft lower scrim; preserve media colour, layout and all pointer targets. */
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__info::before {
  content: "" !important;
  position: absolute !important;
  inset: -24px 0 0 !important;
  z-index: -1 !important;
  pointer-events: none !important;
  border: 0 !important;
  box-shadow: none !important;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.64) 0%, rgba(0, 0, 0, 0.30) 65%, transparent 100%) !important;
}

@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) and ((mask-image: linear-gradient(transparent, black)) or (-webkit-mask-image: linear-gradient(transparent, black))) {
  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__info::before {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 32%, #000 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 32%, #000 100%);
  }
}

/* Desktop detail pages have their information outside the photo mosaic. */
@media (min-width: 1024px) {
  html body.single-esperienze #main .tbp-exp-hero .tbp-exp-card__info::before {
    display: none !important;
  }
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card h3,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card .tbp-exp-card__title,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card .tbp-exp-card__place {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  box-sizing: border-box !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card h3,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card .tbp-exp-card__title {
  display: -webkit-box !important;
  overflow: hidden !important;
  color: #fff !important;
  font-size: var(--tbp-discovery-title-size, 1rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.22 !important;
  text-shadow: 0 1px 2px rgba(6, 56, 31, 0.7), 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  -webkit-text-stroke: 0.5px rgba(6, 56, 31, 0.75);
  paint-order: stroke fill;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: var(--tbp-discovery-title-lines, 2) !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__place {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  overflow: hidden !important;
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 0.72rem !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__head .tbp-exp-card__title {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__price {
  flex: 0 0 auto !important;
  width: auto !important;
  margin: 0 !important;
  padding: 2px 0 0 !important;
  color: #fff !important;
  font-size: var(--tbp-discovery-price-size, 1.08rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.2 !important;
  text-align: right !important;
  white-space: nowrap !important;
  text-shadow: 0 1px 2px rgba(6, 56, 31, 0.7), 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  -webkit-text-stroke: 0.5px rgba(6, 56, 31, 0.75);
  paint-order: stroke fill;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__dock {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: end !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__person {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 4px !important;
  min-width: 0 !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__meta {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 3px !important;
  min-width: 0 !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__maker {
  display: contents !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__portrait {
  position: relative !important;
  display: block !important;
  width: var(--tbp-discovery-portrait) !important;
  margin: 0 !important;
  overflow: visible !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__portrait-frame {
  display: block !important;
  width: var(--tbp-discovery-portrait) !important;
  height: auto !important;
  aspect-ratio: 56 / 72 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--tbp-surface-sage, #f4f7f5) !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28) !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__maker-photo,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__maker-fallback {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: cover !important;
  object-position: center 20% !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__maker-fallback {
  display: grid !important;
  place-items: center !important;
  color: var(--tbp-discovery-green) !important;
  font-size: 1.15rem !important;
  font-weight: 750 !important;
  background: var(--tbp-surface-sage, #f4f7f5) !important;
}

/* 14/10/2026 (CEO: «il checkmark sulla foto!!!»): la spunta non copre più il viso: piccola, sull'angolo in basso a
   destra, appena fuori dalla foto (CEO: «in basso, mica in alto»). */
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__verified {
  position: absolute !important;
  inset: auto -6px -6px auto !important;
  z-index: 2 !important;
  display: grid !important;
  place-items: center !important;
  width: 18px !important;
  height: 18px !important;
  border: 2px solid #ffffff !important;
  border-radius: 50% !important;
  background: var(--tbp-blue-verified, #2F80ED) !important;
  color: #fff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__verified svg {
  display: block !important;
  width: 10px !important;
  height: 10px !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__maker-name {
  text-shadow: 0 1px 3px #000, 0 2px 8px rgba(0, 0, 0, .85) !important;
  overflow: hidden !important;
  max-width: var(--tbp-discovery-portrait, 56px) !important;
  color: #fff !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-align: left !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__tags,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__badges {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px 6px !important;
  width: 100% !important;
  max-width: 100% !important;
  max-height: none !important;
  margin: 0 !important;
  overflow: visible !important;
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 0.64rem !important;
  font-weight: 650 !important;
  letter-spacing: 0.01em !important;
  line-height: 1.3 !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__tag,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__place-bit {
  display: inline-block !important;
  margin: 0 !important;
  padding: 1px 7px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.16) !important;
  color: #fff !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card:not(.tbp-exp-card--scheda):not(.tbp-exp-card--checkout) .tbp-exp-card__tags {
  gap: 4px !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card:not(.tbp-exp-card--scheda):not(.tbp-exp-card--checkout) .tbp-exp-card__tag {
  padding-inline: 5px !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-wrap: anywhere !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__place {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
}

/* Home: località prima di modalità/difficoltà, senza riordinare altre pagine. */
html body.tbp-core-home #tbp-results-container .tbp-exp-card__place {
  order: -1;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__badge {
  display: inline !important;
  padding: 0 !important;
  background: transparent !important;
  color: inherit !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__badge .tbp-meta-icon,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__badge img,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__fact .tbp-meta-icon,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__facts {
  display: none !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__facts {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 4px 8px !important;
  width: 100% !important;
  margin: 2px 0 0 !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__fact {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 0.62rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

html body .tbp-view-toggle {
  display: flex !important;
  width: calc(100% - 24px) !important;
  max-width: 720px !important;
  margin: 4px auto 12px !important;
  padding: 4px !important;
  border: 1px solid rgba(8, 72, 40, 0.12) !important;
  border-radius: var(--tbp-discovery-radius) !important;
  background: var(--tbp-surface-sage, #f4f7f5) !important;
  box-sizing: border-box !important;
}

html body .tbp-view-toggle button {
  flex: 1 1 0 !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 8px 12px !important;
  border: 0 !important;
  border-radius: 20px !important;
  background: transparent !important;
  color: var(--tbp-discovery-green) !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  cursor: pointer !important;
}

html body .tbp-view-toggle button.is-active,
html body .tbp-view-toggle #btn-toggle-mappa.is-active {
  background: #fff !important;
  box-shadow: 0 2px 10px rgba(8, 72, 40, 0.08) !important;
}

html body.tbp-map-mode .tbp-view-toggle #btn-view-grid {
  background: transparent !important;
  box-shadow: none !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__buy {
  position: relative !important;
  z-index: 5 !important;
  overflow: hidden !important;
  isolation: isolate !important;
  contain: paint !important;
  flex: 0 0 auto !important;
  align-self: stretch !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 320px !important;
  min-height: 40px !important;
  margin: 0 auto 0 0 !important;
  padding: 8px 12px !important;
  border: 2px solid var(--tbp-green-dark, #06381F) !important;
  border-radius: 12px !important;
  background: var(--tbp-cta-gold, var(--tbp-gold)) !important;
  color: var(--tbp-gold-label, #fff) !important;
  text-shadow: var(--tbp-gold-label-shadow, none) !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.15 !important;
  text-align: center !important;
  text-decoration: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--wide .tbp-exp-card__buy,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--tall .tbp-exp-card__buy,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--giant .tbp-exp-card__buy {
  width: 100% !important;
  max-width: none !important;
  min-height: 48px !important;
  align-self: stretch !important;
  font-size: 0.95rem !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__buy::after {
  content: "" !important;
  position: absolute !important;
  top: -45% !important;
  right: -45% !important;
  bottom: -45% !important;
  left: -45% !important;
  width: auto !important;
  height: auto !important;
  border-radius: inherit !important;
  background: var(--tbp-cta-light) !important;
  animation: var(--tbp-cta-animation) !important;
  pointer-events: none !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__buy:hover,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__buy:focus-visible {
  background: var(--tbp-cta-gold, var(--tbp-gold)) !important;
  border: 2px solid var(--tbp-green-dark, #06381F) !important;
  color: var(--tbp-gold-label, #fff) !important;
  text-shadow: var(--tbp-gold-label-shadow, none) !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__buy:focus-visible {
  box-shadow: 0 0 0 3px #fff !important;
}

@media (max-width: 849px) {
  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card:not(.tbp-exp-card--wide):not(.tbp-exp-card--tall):not(.tbp-exp-card--giant) .tbp-exp-card__info {
    max-height: none !important;
    padding: 8px 7px 10px !important;
  }

  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card:not(.tbp-exp-card--wide):not(.tbp-exp-card--tall):not(.tbp-exp-card--giant) h3,
  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card:not(.tbp-exp-card--wide):not(.tbp-exp-card--tall):not(.tbp-exp-card--giant) .tbp-exp-card__title {
    font-size: 0.88rem !important;
    -webkit-line-clamp: 2 !important;
  }

  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card:not(.tbp-exp-card--wide):not(.tbp-exp-card--tall):not(.tbp-exp-card--giant) .tbp-exp-card__buy {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 40px !important;
  }

  /* La colonna accanto al ritratto è troppo stretta sulle tall: impila e lascia i badge su righe piene. */
  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--tall .tbp-exp-card__dock {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--tall .tbp-exp-card__tag,
  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--tall .tbp-exp-card__place-bit {
    font-size: 0.68rem !important;
    overflow-wrap: normal !important;
  }
}

@media (max-width: 359px) {
  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card:not(.tbp-exp-card--wide):not(.tbp-exp-card--giant):not(.tbp-exp-card--scheda):not(.tbp-exp-card--checkout) {
    --tbp-discovery-portrait: 56px;
  }

  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--wide {
    --tbp-discovery-portrait: 56px;
  }

  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card:not(.tbp-exp-card--giant):not(.tbp-exp-card--scheda):not(.tbp-exp-card--checkout) .tbp-exp-card__dock {
    gap: 6px !important;
  }

  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--tall .tbp-exp-card__tag,
  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--tall .tbp-exp-card__place-bit {
    font-size: 0.64rem !important;
  }

  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card:not(.tbp-exp-card--wide):not(.tbp-exp-card--giant):not(.tbp-exp-card--scheda):not(.tbp-exp-card--checkout) .tbp-exp-card__tag {
    padding-inline: 2px !important;
    letter-spacing: 0 !important;
  }
}

@media (min-width: 850px) {
  :root {
    --tbp-discovery-gap: 16px;
    --tbp-discovery-portrait: 56px;
  }

  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__info {
    padding: 16px 10px 10px !important;
  }

  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__buy {
    min-height: 44px !important;
    font-size: 0.82rem !important;
    padding: 10px 12px !important;
  }

  html body #tbp-results-container .grid-risultati,
  html body.tbp-core-home #tbp-results-container .grid-risultati {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-flow: dense !important;
    max-width: var(--tbp-discovery-grid-max) !important;
    padding: 0 16px 20px !important;
  }

  html body.tbp-core-home #tbp-results-container .tbp-exp-card--wide {
    grid-column: span 2 !important;
    grid-row: span 1 !important;
  }

  html body.tbp-core-home #tbp-results-container .tbp-exp-card--tall {
    grid-column: span 1 !important;
    grid-row: span 2 !important;
  }

  html body.tbp-core-home #tbp-results-container .tbp-exp-card--giant {
    grid-column: span 2 !important;
    grid-row: span 2 !important;
  }

  html body.tbp-core-home #tbp-results-container .tbp-exp-card--wide .tbp-exp-card__media {
    aspect-ratio: 5 / 4 !important;
    max-height: none !important;
  }

  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card h3,
  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card .tbp-exp-card__title {
    font-size: var(--tbp-discovery-title-size, 1.12rem) !important;
  }

  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__head {
    padding: 24px 12px 20px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__track {
    transition: none !important;
  }

  html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__buy::after {
    animation: none !important;
  }
}

/* Scheda hero: same Home chrome, ~2.5 mosaic tiles. ID-level :is() so these beat the 3/5 tile ratio. */
html body :is(#tbp-results-container, .tbp-exp-card-scope).tbp-exp-hero,
html body.single-esperienze :is(#tbp-results-container, .tbp-exp-card-scope).tbp-exp-hero {
  width: 100%;
  max-width: 560px;
  margin: 0 auto 8px;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope).tbp-exp-hero .tbp-exp-card__media {
  aspect-ratio: 3 / 4 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 380px !important;
  max-height: 620px !important;
}

@media (max-width: 849px) {
  html body :is(#tbp-results-container, .tbp-exp-card-scope).tbp-exp-hero .tbp-exp-card__media {
    min-height: 360px !important;
    max-height: calc(100vh - var(--tbp-app-bar-h, 118px) - var(--tbp-app-bar-inset, 12px) - 180px) !important;
  }
}

html body :is(#tbp-results-container, .tbp-exp-card-scope).tbp-exp-hero .tbp-exp-card__head {
  padding: 28px 12px 16px !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope).tbp-exp-hero .tbp-exp-card__title,
html body :is(#tbp-results-container, .tbp-exp-card-scope).tbp-exp-hero h3 {
  font-size: 1.15rem !important;
  -webkit-line-clamp: 3 !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope).tbp-exp-hero .tbp-exp-card__price {
  color: #fff !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--scheda .tbp-exp-card__buy,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card--checkout .tbp-exp-card__buy {
  display: none !important;
}

/* Checkout: never show the swipe hero. Compact listing only. */
html body.woocommerce-checkout .tbp-exp-card-scope,
html body.woocommerce-checkout .tbp-flow-hero,
html body.woocommerce-cart .tbp-flow-hero {
  display: none !important;
}

@media (min-width: 850px) {
  html body.single-esperienze .tbp-exp-hero,
  html body :is(#tbp-results-container, .tbp-exp-card-scope).tbp-exp-hero {
    max-width: 560px;
    margin: 0 auto 8px;
  }
}


/* Niente pulsante play nativo sui video delle card: se l'autoplay è bloccato
   (es. risparmio energetico iOS) resta il poster pulito e il retry al tocco. */
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card video::-webkit-media-controls-start-playback-button,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card video::-webkit-media-controls-overlay-play-button,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card video::-webkit-media-controls {
  display: none !important;
  -webkit-appearance: none !important;
  opacity: 0 !important;
}


/* iOS: il tag video cattura il tocco e uccide lo swipe della card.
   I video partono da soli e non hanno controlli: il gesto passa alla card. */
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__slide video {
  pointer-events: none !important;
}


/* Prezzo sotto il titolo, allineato a sinistra e più grande (richiesta Elind). */
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__head {
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 3px !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__price {
  text-align: left !important;
  padding: 0 !important;
  font-size: calc(var(--tbp-discovery-price-size, 1.08rem) * 1.15) !important;
}


/* Frecce galleria sulla scheda (solo desktop: su mobile si swippa). */
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__arrow {
  position: absolute !important;
  top: 50% !important;
  z-index: 6 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  height: 42px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(8, 72, 40, 0.14) !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--tbp-green, #084828) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18) !important;
  transform: translateY(-50%) !important;
  cursor: pointer !important;
  transition: background-color 140ms ease, transform 140ms ease;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__arrow--prev {
  left: 14px !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__arrow--next {
  right: 14px !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__arrow:hover {
  background: #fff !important;
  transform: translateY(-50%) scale(1.06) !important;
}

html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__arrow:active {
  transform: translateY(-50%) scale(0.94) !important;
}

@media (min-width: 1024px) {
  html body .tbp-exp-card-scope.tbp-exp-hero .tbp-exp-card__arrow {
    display: flex !important;
  }

  /* Il media della scheda riempie la colonna quasi a schermo intero.
     L':is con l'ID serve solo a pareggiare la specificità delle regole base. */
  html body.single-esperienze :is(#tbp-results-container, .tbp-exp-card-scope).tbp-exp-hero .tbp-exp-card--scheda {
    width: 100% !important;
    max-width: none !important;
  }

  html body.single-esperienze :is(#tbp-results-container, .tbp-exp-card-scope).tbp-exp-hero .tbp-exp-card--scheda .tbp-exp-card__media {
    aspect-ratio: auto !important;
    height: clamp(340px, 44vh, 440px) !important;
    max-height: none !important;
  }
}

/* Cuore preferiti sulle card discovery (preventivo voce 7, scenari 6-7).
   Neutro nel markup (cache condivisa); stato idratato da wishlist.js. */
:is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__wishlist {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 6;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0 !important;
	border-radius: 50%;
	background: rgba(6, 56, 31, 0.28) !important;
	color: #fff;
	cursor: pointer;
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	transition: transform 0.18s ease, background 0.18s ease;
	filter: drop-shadow(0 1px 2px rgba(6, 56, 31, 0.55));
}

:is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__wishlist:hover {
	transform: scale(1.08);
	background: rgba(6, 56, 31, 0.45) !important;
}

:is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__wishlist .tbp-wishlist-btn__svg {
	width: 24px;
	height: 24px;
	display: block;
}

:is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__wishlist.is-active {
	color: #f0be00;
}

:is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__wishlist.is-active .tbp-wishlist-heart {
	fill: currentColor;
}

:is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__wishlist.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Il titolo non deve finire sotto il cuore. */
:is(#tbp-results-container, .tbp-exp-card-scope) :has(> .tbp-exp-card__wishlist) .tbp-exp-card__head {
	padding-right: 60px;
}

/* Keep the review link beside the host, immediately above the location. */
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__meta > .tbp-card-rating {
  order: -2 !important;
  flex-wrap: wrap;
  gap: 2px 4px;
  min-height: 24px;
  margin: 0;
  padding: 0;
  overflow-wrap: anywhere;
}
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__meta:has(> .tbp-card-rating) > .tbp-exp-card__place {
  order: -1 !important;
}
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__meta > .tbp-card-rating:not(:has(.tbp-rating-stars)) {
  flex-wrap: nowrap;
}
/* 1/10 (collaudo): il link delle recensioni era alto 24 px. Area da 44 px con imbottitura trasparente e
   margine negativo uguale: la riga resta alta 24 e niente si sposta. */
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card__meta > a.tbp-card-rating {
  box-sizing: border-box;
  min-height: 44px;
  padding-block: 10px;
  margin-block: -10px;
}

/* Invariant 2026-09-14: the shared card controller owns horizontal movement.
   Never re-enable native momentum or a second overlay relay for bound cards. */
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card.has-bounded-swipe,
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card.has-bounded-swipe .tbp-exp-card__track {
  touch-action: pan-y pinch-zoom !important;
}
html body :is(#tbp-results-container, .tbp-exp-card-scope) .tbp-exp-card.has-bounded-swipe .tbp-exp-card__track.has-soft-snap {
  overflow-x: hidden !important;
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
  -webkit-overflow-scrolling: auto;
}
