/* Keep mobile captions compact without moving links or changing price values. */
@media (max-width: 1024px) {
  html body .product-item.fileo-catalog-card .product-item__content .fileo-card-meta[data-fileo-caption-spec] .fileo-card-commerce.fileo-card-summary {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content !important;
    grid-template-rows: minmax(min-content, auto) !important;
    gap: 0 6px !important;
    align-items: start !important;
  }
  html body .product-item.fileo-catalog-card .product-item__content .fileo-card-meta[data-fileo-caption-spec] .fileo-card-commerce.fileo-card-summary > .fileo-card-attributes {
    display: contents !important;
  }
  html body .product-item.fileo-catalog-card .product-item__content .fileo-card-meta[data-fileo-caption-spec] .fileo-card-commerce.fileo-card-summary > .product-item__price {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    align-self: start !important;
    text-align: left !important;
    margin: 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  html body .product-item.fileo-catalog-card .product-item__content .fileo-card-meta[data-fileo-caption-spec] .fileo-card-commerce.fileo-card-summary .product-item__price :is(.priceval, .mobile-priceval) {
    display: inline-flex !important;
    flex-flow: row wrap !important;
    align-items: start !important;
    gap: 0 3px !important;
    max-width: 100%;
  }
  html body .product-item.fileo-catalog-card .product-item__content .fileo-card-meta[data-fileo-caption-spec] .fileo-card-commerce.fileo-card-summary .fileo-card-attributes > .fileo-card-colors {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    align-self: end !important;
    margin: 0 !important;
    white-space: nowrap !important;
    text-align: right !important;
  }
  html body .product-item.fileo-catalog-card .product-item__content .fileo-card-meta[data-fileo-caption-spec] .fileo-card-commerce.fileo-card-summary .fileo-card-attributes > .fileo-card-sizes {
    grid-column: 1 / 6 !important;
    grid-row: 2 !important;
    text-align: left !important;
    min-width: 0 !important;
    white-space: normal !important;
  }
  html body .product-item.fileo-catalog-card .product-item__content .fileo-card-meta[data-fileo-caption-spec] .fileo-card-commerce.fileo-card-summary .fileo-card-attributes > .fileo-card-length {
    grid-column: 6 / 11 !important;
    grid-row: 2 !important;
    justify-self: end !important;
    text-align: right !important;
    min-width: 0 !important;
    white-space: normal !important;
  }
}

/* Let mobile price rows grow with retail labels and enlarged text. */
@media (max-width: 1024px) {
html body .product-item.fileo-catalog-card .product-item__content .fileo-card-meta:is(.product-item__content--small-tile, .product-item__content--big-tile)[data-fileo-caption-spec] {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html body .product-item.fileo-catalog-card .product-item__content .fileo-card-meta:is(.product-item__content--small-tile, .product-item__content--big-tile)[data-fileo-caption-spec] .fileo-card-commerce.fileo-card-summary > .product-item__price {
  display: flow-root !important;
  height: auto !important;
  min-height: 1.4em !important;
  overflow: visible !important;
}
html body .product-item.fileo-catalog-card .product-item__content .fileo-card-meta:is(.product-item__content--small-tile, .product-item__content--big-tile)[data-fileo-caption-spec] .fileo-card-commerce.fileo-card-summary .product-item__price,
html body .product-item.fileo-catalog-card .product-item__content .fileo-card-meta:is(.product-item__content--small-tile, .product-item__content--big-tile)[data-fileo-caption-spec] .fileo-card-commerce.fileo-card-summary .product-item__price * {
  line-height: 1.4 !important;
}
html body .product-item.fileo-catalog-card .product-item__content .fileo-card-meta:is(.product-item__content--small-tile, .product-item__content--big-tile)[data-fileo-caption-spec] .fileo-card-commerce.fileo-card-summary .fileo-card-attributes > .fileo-card-sizes,
html body .product-item.fileo-catalog-card .product-item__content .fileo-card-meta:is(.product-item__content--small-tile, .product-item__content--big-tile)[data-fileo-caption-spec] .fileo-card-commerce.fileo-card-summary .fileo-card-attributes > .fileo-card-length {
  align-self: start !important;
  height: auto !important;
  line-height: 1.4 !important;
}
}

/* Mobile cards show only the title, price and colour count. */
@media (max-width: 1024px) {
  html body .product-item.fileo-catalog-card .product-item__content .fileo-card-meta:is(.product-item__content--small-tile, .product-item__content--big-tile)[data-fileo-caption-spec] .fileo-card-commerce.fileo-card-summary .fileo-card-attributes > .fileo-card-sizes,
  html body .product-item.fileo-catalog-card .product-item__content .fileo-card-meta:is(.product-item__content--small-tile, .product-item__content--big-tile)[data-fileo-caption-spec] .fileo-card-commerce.fileo-card-summary .fileo-card-attributes > .fileo-card-length {
    display: none !important;
  }
}

/* Keep mobile badges above the visible photo pagination marks. */
@media (max-width: 1024px) {
  html body .product-item.fileo-catalog-card .product-item__img-wrap .fileo-product-labels {
    bottom: 16px !important;
  }
}

/* Frame is 4/3 high; native photo is 636/480. Compensate the 0.625% height gap.
   The visible mark starts 13px above the native frame bottom: add a 3px gap. */
@media (max-width: 1024px) {
  html body .product-item.fileo-catalog-card.fileo-card-gallery .product-item__img_mob:has(.fileo-native-photo) .fileo-product-labels {
    bottom: calc(0.625% + 16px) !important;
  }
}

/* Keep mobile listing titles on one line without changing their accessible text. */
@media (max-width: 1024px) {
  html body .product-item.fileo-catalog-card .product-item__content .fileo-card-meta:is(.product-item__content--small-tile, .product-item__content--big-tile)[data-fileo-caption-spec] .product-item__title.fileo-card-name {
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    -webkit-line-clamp: unset !important;
  }
}

/* Two compact caption rows, followed by a small gap before the next photo. */
@media (max-width: 1024px) {
  html body .product-item.fileo-catalog-card > .product-item__content {
    min-height: 0 !important;
    height: auto !important;
  }
  html body .content-catalog .catalog-wrap:has(> .product-item.fileo-catalog-card) {
    row-gap: 8px !important;
  }
}
