/* =====================================================================
   mod_tour_cards – inMysore Holidays
   Cards, filters, similar tours and guide list
   ===================================================================== */

.tour-cards,
.tc-guides {
  --tc-brand: #0b5bba;
  --tc-brand-dark: #09488f;
  --tc-brand-soft: #eaf2fd;
  --tc-accent: #fe7028;
  --tc-ink: #0f172a;
  --tc-text: #334155;
  --tc-muted: #64748b;
  --tc-line: #e8edf3;
  --tc-ok: #15803d;
  --tc-radius: 18px;
  --tc-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 6px 20px rgba(15, 23, 42, 0.06);
  --tc-shadow-hover: 0 2px 4px rgba(15, 23, 42, 0.06), 0 18px 36px rgba(15, 23, 42, 0.12);
}

.tour-cards *, .tc-guides * { box-sizing: border-box; }

.tour-cards { margin: 0 0 28px; }

.tour-cards .visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Heading ---------- */
.tour-packages__header { margin-bottom: 18px; }

.tour-cards .tour-packages__title,
.tour-cards .tour-cards__heading {
  margin: 0 0 6px !important;
  font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.75rem) !important;
  line-height: 1.25 !important;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--tc-ink);
}

.tour-packages__intro { margin: 0; color: var(--tc-muted); line-height: 1.6; }

/* ---------- Filter bar ---------- */
.tour-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px 20px 18px;
  border: 1px solid var(--tc-line);
  border-radius: var(--tc-radius);
  background: #fff;
  box-shadow: var(--tc-shadow);
}

@media (min-width: 992px) {
  .tour-filters { position: sticky; top: 72px; z-index: 20; }
}

.tour-filters__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--tc-line);
}

.tour-filters__label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--tc-ink);
}

.tour-filters__result {
  flex: 1 1 auto;
  margin: 0 !important;
  font-size: 0.88rem !important;
  font-weight: 600;
  color: var(--tc-brand);
}

.tour-filters__clear {
  padding: 6px 14px;
  border: 1px solid var(--tc-line);
  border-radius: 999px;
  background: #fff;
  color: var(--tc-text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.tour-filters__clear::before { content: "✕"; margin-right: 6px; font-size: 0.7rem; }
.tour-filters__clear:hover { border-color: #cbd5e1; color: var(--tc-ink); }

.tour-filters__row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.tour-filters__row-label {
  padding-top: 9px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tc-muted);
}

.tour-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tour-pill {
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid var(--tc-line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--tc-text);
  font-size: 0.87rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.tour-pill[hidden] { display: none !important; }
.tour-pill:hover { border-color: var(--tc-brand); color: var(--tc-brand); background: #fff; }

.tour-pill--active,
.tour-pill--active:hover {
  border-color: var(--tc-brand);
  background: var(--tc-brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(11, 91, 186, 0.22);
}

.tour-filters__native {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  opacity: 0; pointer-events: none;
}

.tour-pill:focus-visible,
.tour-filters__clear:focus-visible,
.tour-packages__more-btn:focus-visible {
  outline: 3px solid rgba(11, 91, 186, 0.3);
  outline-offset: 2px;
}

@media (max-width: 767.98px) {
  .tour-filters { padding: 14px 0 14px; gap: 10px; }
  .tour-filters__head { padding: 0 16px 10px; }
  .tour-filters__row { display: block; }
  .tour-filters__row-label { display: block; padding: 0 16px 6px; }

  /* One swipeable line per row instead of three wrapped rows of pills. */
  .tour-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 16px 4px;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
            mask-image: linear-gradient(90deg, #000 85%, transparent);
  }

  .tour-pills::-webkit-scrollbar { display: none; }
  .tour-pill { min-height: 36px; padding: 7px 13px; font-size: 0.84rem; }
}

/* ---------- Grid ---------- */
.tour-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px)  { .tour-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; } }
@media (min-width: 1024px) { .tour-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }

/* ---------- Tour card ---------- */
.tour-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--tc-line);
  border-radius: var(--tc-radius);
  background: #fff;
  box-shadow: var(--tc-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.tour-card[hidden] { display: none !important; }

@media (hover: hover) {
  .tour-card:hover { transform: translateY(-4px); box-shadow: var(--tc-shadow-hover); }
  .tour-card:hover .tour-card__image { transform: scale(1.05); }
  .tour-card:hover .tour-card__cta { background: var(--tc-brand); color: #fff; }
  .tour-card:hover .tour-card__cta::after { transform: translateX(3px); }
}

.tour-card:focus-within { box-shadow: 0 0 0 3px rgba(11, 91, 186, 0.3), var(--tc-shadow-hover); }

.tour-card__media {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #e2e8f0;
}

.tour-card__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.35) 100%);
  pointer-events: none;
}

.tour-card__image {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tour-card__duration {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--tc-ink);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.tour-card__duration::before {
  content: "";
  width: 13px;
  height: 13px;
  background: var(--tc-brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2V2h-2v2H9V2H7zm-2 8h14v10H5V10z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2V2h-2v2H9V2H7zm-2 8h14v10H5V10z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tour-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--tc-brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
}

.tour-card__badge--best-seller { background: var(--tc-accent); }
.tour-card__badge--family      { background: #15803d; }
.tour-card__badge--honeymoon   { background: #be185d; }

.tour-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 18px;
}

.tour-cards .tour-card__title {
  margin: 0 !important;
  font-size: 1.02rem !important;
  line-height: 1.38 !important;
  font-weight: 700;
  color: var(--tc-ink);
}

.tour-card__link {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: inherit !important;
  text-decoration: none !important;
}

/* The title link covers the whole card, so a tap anywhere opens the tour. */
.tour-card__link::after { content: ""; position: absolute; inset: 0; z-index: 2; }

.tour-card__places {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  font-size: 0.85rem !important;
  line-height: 1.35 !important;
  color: var(--tc-muted);
}

.tour-card__places::before {
  content: "";
  flex: 0 0 13px;
  height: 13px;
  background: var(--tc-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tour-card__includes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.tour-card__includes li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 !important;
  font-size: 0.78rem !important;
  line-height: 1.4 !important;
  color: var(--tc-text);
}

.tour-card__includes li::before {
  content: "";
  width: 11px;
  height: 11px;
  background: var(--tc-ok);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tour-card__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--tc-line);
}

.tour-card__price {
  display: grid;
  margin: 0 !important;
  line-height: 1.15 !important;
}

.tour-card__price-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tc-muted);
}

.tour-card__price-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--tc-ink);
}

.tour-card__price-unit { font-size: 0.75rem; color: var(--tc-muted); }

.tour-card__price--none {
  align-self: center;
  font-size: 0.85rem !important;
  font-weight: 600;
  color: var(--tc-muted);
}

.tour-card__cta {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--tc-brand-soft);
  color: var(--tc-brand);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.tour-card__cta::after { content: "→"; transition: transform 0.2s; }

/* ---------- Show more, price note, empty state ---------- */
.tour-packages__more { margin-top: 22px; text-align: center; }

.tour-packages__more-btn {
  min-height: 46px;
  padding: 11px 26px;
  border: 1px solid var(--tc-brand);
  border-radius: 999px;
  background: #fff;
  color: var(--tc-brand);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.tour-packages__more-btn:hover { background: var(--tc-brand); color: #fff; }

.tour-cards__price-note {
  max-width: 720px;
  margin: 16px auto 0 !important;
  font-size: 0.8rem !important;
  line-height: 1.5 !important;
  text-align: center;
  color: var(--tc-muted);
}

.tour-empty-state {
  margin-top: 20px;
  padding: 26px 18px;
  border: 1px dashed #cbd5e1;
  border-radius: var(--tc-radius);
  background: #f8fafc;
  text-align: center;
}

.tour-empty-state h3 { margin: 0 0 6px !important; font-size: 1.1rem !important; }
.tour-empty-state p { margin: 0 0 14px; color: var(--tc-muted); }

.tour-empty-state__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #25d366;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none !important;
}

/* ---------- Similar tours: one swipe row, 4 cards on desktop ---------- */
.tour-cards--similar { margin: 8px 0 28px; }

.tc-carousel { position: relative; }

.tc-similar {
  display: flex;
  gap: 16px;
  margin: 0 !important;
  padding: 4px 2px 14px !important;
  list-style: none !important;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tc-similar::-webkit-scrollbar { display: none; }

.tc-similar__item {
  flex: 0 0 80%;
  max-width: 300px;
  margin: 0 !important;
  padding: 0 !important;
  scroll-snap-align: start;
}

.tc-similar__item::before { content: none !important; }

@media (min-width: 640px)  { .tc-similar__item { flex-basis: calc((100% - 16px) / 2); max-width: none; } }
@media (min-width: 900px)  { .tc-similar__item { flex-basis: calc((100% - 32px) / 3); } }
@media (min-width: 1140px) { .tc-similar__item { flex-basis: calc((100% - 48px) / 4); } }

.tc-carousel__btn {
  position: absolute;
  top: 34%;
  z-index: 3;
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--tc-line);
  border-radius: 50%;
  background: #fff;
  color: var(--tc-ink);
  font-size: 1.6rem;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
  cursor: pointer;
  transform: translateY(-50%);
}

.tc-carousel__btn--prev { left: -12px; }
.tc-carousel__btn--next { right: -12px; }
.tc-carousel__btn:disabled { opacity: 0; pointer-events: none; }
.tc-carousel__btn:hover { background: var(--tc-brand); color: #fff; border-color: var(--tc-brand); }

@media (min-width: 640px) and (hover: hover) {
  .tc-carousel.is-scrollable .tc-carousel__btn { display: inline-flex; }
}

.tc-similar__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--tc-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--tc-shadow);
  color: inherit !important;
  text-decoration: none !important;
  opacity: 1 !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

@media (hover: hover) {
  .tc-similar__card:hover { transform: translateY(-3px); box-shadow: var(--tc-shadow-hover); }
  .tc-similar__card:hover img { transform: scale(1.05); }
}

.tc-similar__card:focus-visible { outline: 3px solid rgba(11, 91, 186, 0.35); outline-offset: 2px; }

.tc-similar__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e2e8f0;
}

.tc-similar__media img {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tc-similar__media .tour-card__duration { left: 10px; bottom: 10px; padding: 5px 9px; font-size: 0.72rem; }

.tc-similar__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 7px;
  padding: 12px 14px 14px;
}

.tour-cards .tc-similar__title {
  margin: 0 !important;
  font-size: 0.92rem !important;
  line-height: 1.38 !important;
  font-weight: 700;
  color: var(--tc-ink);
}

.tc-similar__why {
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: 7px;
  background: #fff4ec;
  color: #b4470c;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
}

.tc-similar__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--tc-line);
}

.tc-similar__price { font-size: 0.74rem; color: var(--tc-muted); line-height: 1.2; }
.tc-similar__price strong { font-size: 1.02rem; font-weight: 800; color: var(--tc-ink); }
.tc-similar__price small { display: block; font-size: 0.7rem; }

.tc-similar__meta .tour-card__cta { padding: 7px 11px; font-size: 0.78rem; }

.tc-similar__all { margin: 14px 0 0 !important; text-align: center; }

.tc-similar__all a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid var(--tc-brand);
  border-radius: 999px;
  color: var(--tc-brand) !important;
  font-weight: 700;
  text-decoration: none !important;
  transition: background 0.2s, color 0.2s;
}

.tc-similar__all a:hover { background: var(--tc-brand); color: #fff !important; }

@media (max-width: 639.98px) {
  .tc-similar__all a { width: 100%; }
}

/* The "View tour" pill fills blue on hover; !important beats the template's link hover styles. */
@media (hover: hover) {
  .tour-card:hover .tour-card__cta,
  .tc-similar__card:hover .tour-card__cta {
    background: var(--tc-brand) !important;
    color: #fff !important;
    opacity: 1 !important;
  }
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 639.98px) {
  .tour-card__media { aspect-ratio: 16 / 10; }
  .tour-cards .tour-card__title { font-size: 1rem !important; }
  .tour-packages__more-btn { width: 100%; }
}

/* ---------- Guide list ---------- */
.tc-guides { display: flex; flex-direction: column; gap: 18px; }

.tc-guide {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 20px;
  padding: 14px;
  border: 1px solid var(--tc-line);
  border-radius: var(--tc-radius);
  background: #fff;
  box-shadow: var(--tc-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

@media (hover: hover) {
  .tc-guide:hover { transform: translateY(-3px); box-shadow: var(--tc-shadow-hover); }
  .tc-guide:hover img { transform: scale(1.05); }
}

.tc-guide__media {
  flex: 0 0 220px;
  overflow: hidden;
  border-radius: 12px;
  background: #e2e8f0;
  aspect-ratio: 3 / 2;
}

.tc-guide__media img {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tc-guide__body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 8px; min-width: 0; padding: 4px 4px 4px 0; }

.tc-guides .tc-guide__title {
  margin: 0 !important;
  font-size: 1.2rem !important;
  line-height: 1.3 !important;
  font-weight: 700;
}

.tc-guide__title a { color: var(--tc-ink) !important; text-decoration: none !important; }
.tc-guide__title a::after { content: ""; position: absolute; inset: 0; }

.tc-guide__text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  color: var(--tc-text);
}

.tc-guide__more {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  margin-top: auto;
  color: var(--tc-brand) !important;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none !important;
}

@media (max-width: 575.98px) {
  .tc-guide { flex-direction: column; gap: 12px; padding: 12px; }
  .tc-guide__media { flex-basis: auto; width: 100%; aspect-ratio: 16 / 10; }
  .tc-guides .tc-guide__title { font-size: 1.08rem !important; }
  .tc-guide__text { font-size: 0.9rem !important; }
}
