/* Tempo Product Highlights
 * Theme component for Tempo.bg.
 * Loaded globally by the module through the OpenCart common/header event.
 */

/* ---------- Shared ---------- */
.tempo-highlights,
.tempo-highlights * {
  box-sizing: border-box;
}

.product-media {
  position: relative;
}

.tempo-highlight__icon {
  display: block;
  object-fit: contain;
}

/* ---------- Listing cards / Universal Products ---------- */
.product-media .tempo-highlights--listing,
.product-media .tempo-highlights--module {
  position: absolute;
  z-index: 4;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 7px 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 4px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .05);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.product-media .tempo-highlight {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.product-media .tempo-highlight__icon {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  max-width: 18px;
  min-height: 18px;
  max-height: 18px;
  flex: 0 0 18px;
}

.product-media .tempo-highlight__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 400;
  color: #171717;
}

/* ---------- Product page ---------- */
.tempo-highlights--product {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.tempo-highlights--product .tempo-highlight {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 4px;
  background: #fff;
}

.tempo-highlights--product .tempo-highlight__icon {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px;
  max-width: 28px;
  min-height: 28px;
  max-height: 28px;
  flex: 0 0 28px;
}

.tempo-highlights--product .tempo-highlight__content {
  min-width: 0;
}

.tempo-highlights--product .tempo-highlight__label {
  display: block;
  margin: 0 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 500;
  color: #777;
}

.tempo-highlights--product .tempo-highlight__value {
  display: block;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  color: #171717;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .product-media .tempo-highlights--listing,
  .product-media .tempo-highlights--module {
    left: 6px;
    right: 6px;
    bottom: 6px;
    padding: 6px;
  }

  .product-media .tempo-highlight {
    gap: 4px;
  }

  .product-media .tempo-highlight__icon {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px;
    max-width: 15px;
    min-height: 15px;
    max-height: 15px;
    flex-basis: 15px;
  }

  .product-media .tempo-highlight__value {
    font-size: 10px;
  }
}

@media (max-width: 767.98px) {
  .tempo-highlights--product {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .product-media .tempo-highlights--listing,
  .product-media .tempo-highlights--module {
    left: 5px;
    right: 5px;
    bottom: 5px;
    gap: 2px;
    padding: 5px;
    border-radius: 4px;
  }

  .product-media .tempo-highlight {
    gap: 3px;
  }

  .product-media .tempo-highlight__icon {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px;
    max-width: 14px;
    min-height: 14px;
    max-height: 14px;
    flex-basis: 14px;
  }

  .product-media .tempo-highlight__value {
    font-size: 9px;
  }

  .tempo-highlights--product {
    gap: 6px;
  }

  .tempo-highlights--product .tempo-highlight {
    gap: 7px;
    padding: 8px;
  }

  .tempo-highlights--product .tempo-highlight__icon {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px;
    max-width: 24px;
    min-height: 24px;
    max-height: 24px;
    flex-basis: 24px;
  }

  .tempo-highlights--product .tempo-highlight__label {
    font-size: 9px;
  }

  .tempo-highlights--product .tempo-highlight__value {
    font-size: 12px;
  }
}
