/* =========================================================
   COMPONENT — Tour / product card (docs/sections/product-listing.md)
   Design size 306×499 at 1440. Width is fluid; image keeps 293:343.
   ========================================================= */

.tour-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 6px;
  border-radius: 14px;
  background: var(--color-white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  transition: transform .35s ease, box-shadow .35s ease;
}

/* ---------- Media ---------- */
.tour-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-media);
  aspect-ratio: 293 / 343;
}
.tour-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.tour-card__badge {
  position: absolute;
  right: 14px;
  bottom: 18px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-yellow);
  color: var(--color-white);
  font-size: 11px;
  line-height: 17px;
  font-weight: 700;
}

/* ---------- Body ---------- */
.tour-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 26px 6px 9px;
}

.tour-card__rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 2px;
  color: var(--color-primary);
  font-size: 11px;
  line-height: 14px;
}
.tour-card__stars { display: inline-flex; gap: 3px; }
.tour-card__stars img { width: 9px; height: 8px; }
.tour-card__stars img.is-empty { filter: grayscale(1); opacity: .35; }

.tour-card__title {
  /* Full card width, max 2 lines (ellipsis beyond) so every card keeps the same height */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 44px;
  margin: 0 0 13px;
  font-size: 18px;
  line-height: 22px;
  font-weight: 400;
  letter-spacing: 0;
}
.tour-card__title a { color: var(--color-dark); }
.tour-card__title a:hover { color: var(--color-primary); }

.tour-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.tour-card__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 12px;
  margin: 0;
}
.tour-card__price-old {
  color: var(--color-danger);
  font-size: 17.42px;
  font-weight: 400;
}
.tour-card__price-now { color: var(--color-dark); }

/* ---------- Hover: lift + image zoom ---------- */
.tour-card:hover,
.tour-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}
.tour-card:hover .tour-card__img,
.tour-card:focus-within .tour-card__img { transform: scale(1.08); }

@media (prefers-reduced-motion: reduce) {
  .tour-card, .tour-card__img { transition: none; }
}

/* ---------- Variant: wide (Top Destinations) — near-square image, 10px padding ---------- */
.tour-card--wide { padding: 10px; }
.tour-card--wide .tour-card__media { aspect-ratio: 351 / 342; }
.tour-card--wide .tour-card__body { padding: 14px 4px 6px; }

/* ---------- Tablet & mobile: compact card (2–3 per row) ---------- */
@media (max-width: 991.98px) {
  .tour-card,
  .tour-card--wide { padding: 5px; border-radius: 12px; }
  .tour-card__badge { right: 8px; bottom: 10px; padding: 3px 9px; font-size: 10px; line-height: 14px; }
  .tour-card__body,
  .tour-card--wide .tour-card__body { padding: 12px 4px 4px; }
  .tour-card__rating { gap: 6px; margin-bottom: 4px; font-size: 10px; }
  .tour-card__title { min-height: 36px; margin-bottom: 10px; font-size: 15px; line-height: 18px; }
  /* Price on its own row, full-width button below */
  .tour-card__footer { flex-direction: column; align-items: stretch; gap: 8px; }
  .tour-card__price { column-gap: 8px; }
  .tour-card__price-old,
  .tour-card__price-now { font-size: 15px; }
  .tour-card__footer .btn-ds { justify-content: space-between; height: 34px; padding-left: 12px; }
}

@media (max-width: 575.98px) {
  .tour-card__title { min-height: 34px; font-size: 14px; line-height: 17px; }
  .tour-card__price-old,
  .tour-card__price-now { font-size: 14px; }
}

/* ---------- Variant: row (Sign in / Sign up) — small horizontal card ----------
   Same parts and styles as the card above, laid out sideways: image (293:343) on the left,
   rating, title and price + Book Now on the right. Fixed small size on every screen. */
.tour-card--row {
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  padding: 6px;
  border-radius: 14px;
}
.tour-card--row:hover,
.tour-card--row:focus-within { transform: translateY(-2px); }
.tour-card--row .tour-card__media { flex: 0 0 92px; width: 92px; aspect-ratio: 293 / 343; }
.tour-card--row .tour-card__badge { right: 6px; bottom: 8px; padding: 2px 7px; font-size: 9px; line-height: 13px; }
.tour-card--row .tour-card__body { flex: 1 1 auto; min-width: 0; padding: 6px 6px 4px 0; }
.tour-card--row .tour-card__rating { gap: 6px; margin-bottom: 4px; font-size: 10px; line-height: 13px; }
.tour-card--row .tour-card__title { min-height: 0; margin-bottom: 8px; font-size: 15px; line-height: 19px; }
.tour-card--row .tour-card__footer { flex-direction: row; align-items: center; gap: 8px; }
.tour-card--row .tour-card__price { column-gap: 6px; }
.tour-card--row .tour-card__price-old,
.tour-card--row .tour-card__price-now { font-size: 13px; }
.tour-card--row .btn-ds--xs { flex: 0 0 auto; width: auto; height: 30px; padding-left: 10px; font-size: 11px; justify-content: center; }
.tour-card--row .icon-circle { width: 22px; height: 22px; }
