/* Стили для каталога туров */
.tours-grid .tour-card {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.tour-cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  align-items: stretch;
}

.tour-card {
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(90, 170, 255, 0.12);
  overflow: hidden;
  background: #ffffff;
  font-family: 'Open Sans', sans-serif;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  min-height: 520px;
  border: 1px solid rgba(90, 170, 255, 0.08);
  position: relative;
  content-visibility: auto;
  contain: layout paint;
  contain-intrinsic-size: 620px;
}

.tour-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(90, 170, 255, 0.2);
  border-color: rgba(90, 170, 255, 0.15);
}

.tour-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tour-card:hover img {
  transform: scale(1.08);
}

.tour-card:hover .image-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(90, 170, 255, 0.1), rgba(116, 215, 255, 0.1));
  z-index: 1;
}

.tour-card .content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
  padding: 28px;
  background: #ffffff;
}

.tour-card h3 {
  font-size: 1.3rem;
  margin: 0 0 8px 0;
  font-weight: 700;
  color: #1a202c;
  line-height: 1.4;
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Open Sans', sans-serif;
}

.tour-card .fmt-red {
  color: #dc2626;
  font-weight: 600;
}

.tour-card .fmt-blue {
  color: #2563eb;
  font-weight: 600;
}

.tour-card .fmt-green {
  color: #059669;
  font-weight: 600;
}

.tour-card .fmt-gold {
  color: #d97706;
  font-weight: 600;
}

.tour-card .location {
  color: #d97706;
  font-size: 0.9rem;
  margin: 0 0 12px 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'Open Sans', sans-serif;
}

.tour-card .description {
  font-size: 1rem;
  color: #4a5568;
  margin-bottom: 16px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 5.5em;
  flex-grow: 1;
  font-family: 'Open Sans', sans-serif;
}

.tour-card .bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 183, 77, 0.18);
}

.tour-card .price-block {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tour-card .price {
  color: #1a202c;
  font-weight: 800;
  font-size: 2rem;
  display: flex;
  align-items: baseline;
  gap: 4px;
  background: linear-gradient(135deg, #ffd66b, #ffb347);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Open Sans', sans-serif;
}

.compare-prices-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.compare-prices-link:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
  text-decoration: none;
  color: white;
}

.compare-prices-link svg {
  width: 14px;
  height: 14px;
}

.tour-card .price .currency {
  font-size: 1.6rem;
  font-weight: 600;
  background: inherit;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: 'Open Sans', sans-serif;
}

.tour-card .price.price--has-discount {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: none;
  -webkit-text-fill-color: initial;
  color: #1a202c;
}

.tour-card .price.price--has-discount .price-original,
.tour-card .price.price--has-discount .price-current {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.tour-card .price.price--has-discount .price-original {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(26, 32, 44, 0.65);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(26, 32, 44, 0.35);
}

.tour-card .price.price--has-discount .price-original .currency {
  font-size: 0.95rem;
  font-weight: 600;
  color: inherit;
  background: none;
  -webkit-text-fill-color: initial;
}

.tour-card .price.price--has-discount .price-current {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffd66b, #ffb347);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tour-card .price.price--has-discount .price-current .currency {
  font-size: 1.3rem;
  font-weight: 700;
  background: inherit;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 640px) {
  .tour-card .price.price--has-discount {
    gap: 2px;
  }

  .tour-card .price.price--has-discount .price-current {
    font-size: 1.5rem;
  }

  .tour-card .price.price--has-discount .price-current .currency {
    font-size: 1.2rem;
  }
}

/* Стили для "По запросу" */
.tour-card .price.price-on-request {
  background: linear-gradient(135deg, #ff8a00, #ff9500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.4rem;
  font-weight: 700;
}

.tour-card .price-on-request-text {
  font-style: italic;
  letter-spacing: 0.5px;
}

.tour-card .duration {
  font-size: 0.8rem;
  color: #64748b;
  background: rgba(90, 170, 255, 0.1);
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-family: 'Open Sans', sans-serif;
}

.tour-card button {
  margin-top: 12px;
  padding: 12px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffd66b 0%, #ffb347 100%);
  color: white;
  font-weight: 600;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 6px 16px rgba(255, 179, 71, 0.28);
  width: auto;
  min-width: 140px;
}

.tour-card button:hover {
  background: linear-gradient(135deg, #ffc94d 0%, #ffa733 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 179, 71, 0.4);
}

/* Стили для ссылок-кнопок в карточках туров — see bottom of file */

.theme-sharm .tour-card .location {
  color: #1d4ed8;
}

.theme-phuket .tour-card .location {
  color: #047857;
}

.theme-sharm .tour-card .duration {
  background: rgba(96, 165, 250, 0.12);
  color: #1d4ed8;
}

.theme-phuket .tour-card .duration {
  background: rgba(34, 197, 94, 0.12);
  color: #047857;
}

.theme-sharm .tour-card .bottom {
  border-top: 1px solid rgba(37, 99, 235, 0.18);
}

.theme-phuket .tour-card .bottom {
  border-top: 1px solid rgba(5, 150, 105, 0.2);
}

.theme-sharm .tour-card .price,
.theme-sharm .tour-card .price.price-on-request {
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theme-phuket .tour-card .price,
.theme-phuket .tour-card .price.price-on-request {
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theme-sharm .tour-card .price .currency,
.theme-phuket .tour-card .price .currency {
  background: inherit;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.theme-sharm .tour-card .price.price--has-discount .price-current,
.theme-sharm .tour-card .price.price--has-discount .price-current .currency {
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.theme-phuket .tour-card .price.price--has-discount .price-current,
.theme-phuket .tour-card .price.price--has-discount .price-current .currency {
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.theme-sharm .tour-card .price.price--has-discount {
  color: #1a1f2e;
}

.theme-phuket .tour-card .price.price--has-discount {
  color: #173822;
}

.theme-sharm .tour-card .btn--primary,
.theme-sharm .tour-card button {
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%) !important;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28);
  color: #fff !important;
}

.theme-sharm .tour-card .btn--primary:hover,
.theme-sharm .tour-card button:hover {
  background: linear-gradient(135deg, #4f8df7 0%, #1d4ed8 100%) !important;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.35);
  color: #fff !important;
}

.theme-phuket .tour-card .btn--primary,
.theme-phuket .tour-card button {
  background: linear-gradient(135deg, #34d399 0%, #059669 100%) !important;
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.28);
  color: #fff !important;
}

.theme-phuket .tour-card .btn--primary:hover,
.theme-phuket .tour-card button:hover {
  background: linear-gradient(135deg, #2fb488 0%, #047857 100%) !important;
  box-shadow: 0 10px 28px rgba(5, 150, 105, 0.35);
  color: #fff !important;
}

.theme-phuket .tour-card .price.price-on-request,
.theme-sharm .tour-card .price.price-on-request {
  font-weight: 700;
}

.image-wrapper {
  position: relative;
  width: 100%;
  min-height: 260px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0;
  background: linear-gradient(45deg, #f8fafc, #e2e8f0);
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.duration-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 251, 255, 0.95) 100%);
  color: #5aaaff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(90, 170, 255, 0.25);
  z-index: 1;
  border: 1px solid rgba(90, 170, 255, 0.2);
  backdrop-filter: blur(10px);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'Open Sans', sans-serif;
}

/* Бейджи "Мы рекомендуем" и "Горячее предложение" */
.badge-recommended,
.badge-hot {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 15px;
  z-index: 2;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  font-family: 'Open Sans', sans-serif;
  white-space: nowrap;
}

.badge-recommended {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.95) 0%, rgba(255, 193, 7, 0.95) 100%);
  color: #1a202c;
  border: 1px solid rgba(255, 215, 0, 0.4);
}

.badge-hot {
  background: linear-gradient(135deg, rgba(255, 69, 0, 0.95) 0%, rgba(255, 99, 71, 0.95) 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 69, 0, 0.4);
  top: 50px; /* Смещаем вниз, если есть оба бейджа */
}

/* Если оба бейджа присутствуют одновременно */
.image-wrapper .badge-recommended + .badge-hot {
  top: 50px;
}

/* Мобильные стили для кнопок */
@media (max-width: 768px) {
  .tour-card button {
    margin-top: 8px;
    padding: 8px 14px;
    font-size: 0.8rem;
    border-radius: 10px;
    letter-spacing: 0.2px;
    min-width: 90px;
    box-shadow: 0 4px 12px rgba(90, 170, 255, 0.2);
  }
  
  .tour-card button:hover {
    transform: translateY(-0.5px);
    box-shadow: 0 6px 18px rgba(90, 170, 255, 0.3);
  }
}

/* ============================================
   Card meta: location + rating row
   ============================================ */
.tour-card .card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.tour-card .card-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Open Sans', sans-serif;
  color: #1a202c;
}

.tour-card .card-rating__star {
  color: #f59e0b;
  font-size: 1rem;
}

.tour-card .card-rating__value {
  font-weight: 700;
}

.tour-card .card-rating__count {
  font-weight: 400;
  color: #64748b;
  font-size: 0.8rem;
}

/* Improved CTA button — larger, more prominent */
.tour-card .btn--primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 14px;
  background: linear-gradient(135deg, #FFD166 0%, #FF9F1C 100%) !important;
  color: #1B2A3D !important;
  font-family: 'Open Sans', sans-serif !important;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: none;
  letter-spacing: 0.1px;
  box-shadow: 0 4px 16px rgba(255, 159, 28, 0.25);
  border: none;
  min-width: 160px;
  text-align: center;
}

.tour-card .btn--primary:hover {
  background: linear-gradient(135deg, #FFC94D 0%, #FF8F00 100%) !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(255, 159, 28, 0.35);
  color: #1B2A3D !important;
  text-decoration: none;
}

.tour-card .btn--primary:active {
  transform: translateY(0px);
}

/* ===== SKELETON LOADING CARDS ===== */
@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-card {
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  border: 1px solid rgba(90, 170, 255, 0.08);
  box-shadow: 0 4px 16px rgba(90, 170, 255, 0.08);
}

.skeleton-card__img {
  width: 100%;
  height: 220px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite ease-in-out;
}

.skeleton-card__body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-card__line {
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite ease-in-out;
}

.skeleton-card__line--title { width: 75%; height: 20px; }
.skeleton-card__line--desc  { width: 100%; }
.skeleton-card__line--desc2 { width: 60%; }
.skeleton-card__line--price { width: 40%; height: 24px; margin-top: auto; }
.skeleton-card__line--btn   { width: 50%; height: 40px; border-radius: 12px; }