/* hotel.css - Modern Responsive Styles for WebETrip Hotel & Accommodation Search */
:root {
  --primary: #0d9488;         /* Teal modern hotel palette */
  --primary-hover: #0f766e;
  --primary-light: #ccfbf1;
  --secondary: #0f172a;
  --accent: #f59e0b;          /* Star gold */
  --accent-hover: #d97706;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --info: #3b82f6;
  --info-bg: #eff6ff;
  --purple: #8b5cf6;
  --purple-bg: #f5f3ff;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-focus: #14b8a6;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 14px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
}

/* Header & Banner */
.site-header {
  background: linear-gradient(135deg, #0f172a 0%, #134e4a 50%, #0d9488 100%);
  color: white;
  padding: 30px 20px 40px;
  box-shadow: var(--shadow);
  position: relative;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.brand-link {
  color: #5eead4;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}

.brand-link:hover {
  opacity: 0.85;
}

.nav-links {
  display: flex;
  gap: 15px;
}

.nav-item {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all 0.2s;
  background: rgba(255,255,255,0.08);
}

.nav-item:hover, .nav-item.active {
  background: rgba(255,255,255,0.22);
  color: #ffffff;
}

.site-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-subtitle {
  color: #99f6e4;
  font-size: 1.05rem;
  font-weight: 400;
}

/* Main Container */
.main-container {
  max-width: 1200px;
  margin: -25px auto 40px;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

/* Search Card */
.search-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(226, 232, 240, 0.8);
  margin-bottom: 24px;
}

.search-form-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 1fr auto;
  gap: 16px;
  align-items: end;
}

@media (max-width: 992px) {
  .search-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .search-form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: all 0.2s;
  background-color: #fff;
  color: var(--text-main);
}

.input-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.date-range-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-range-container .input-control {
  flex: 1;
}

.date-sep {
  color: var(--text-muted);
  font-weight: 600;
}

.btn-search {
  background: linear-gradient(135deg, var(--primary) 0%, #0f766e 100%);
  color: white;
  border: none;
  padding: 11px 26px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
}

.btn-search:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #115e59 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

/* Quick City Selector */
.quick-cities {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
}

.city-pill {
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 16px;
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}

.city-pill:hover, .city-pill.active {
  background: var(--primary-light);
  color: var(--primary-hover);
  border-color: #5eead4;
  font-weight: 600;
}

/* Content Layout */
.content-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
}

/* Filters Sidebar */
.filter-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  height: fit-content;
}

.filter-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.filter-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-main);
  cursor: pointer;
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* Results Section */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.results-count {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.results-count span {
  color: var(--primary);
}

.sort-select-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.sort-select {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  background-color: #fff;
  color: var(--text-main);
  outline: none;
}

/* Stats Ribbon */
.stats-ribbon {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  background: white;
  border-radius: 10px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.stat-item strong {
  color: var(--text-main);
  font-size: 1rem;
}

.badge-cache {
  font-size: 0.75rem;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.badge-crawl {
  font-size: 0.75rem;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* Hotel Card */
.hotel-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 240px 1fr 190px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.hotel-card:hover {
  box-shadow: var(--shadow);
  border-color: #99f6e4;
  transform: translateY(-2px);
}

@media (max-width: 800px) {
  .hotel-card {
    grid-template-columns: 1fr;
  }
}

.hotel-img-wrapper {
  position: relative;
  background-color: #e2e8f0;
  min-height: 180px;
}

.hotel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hotel-source-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.hotel-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hotel-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.hotel-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.hotel-name-en {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.star-rating {
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.hotel-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hotel-room-type {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f766e;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.amenities-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.amenity-tag {
  font-size: 0.76rem;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.hotel-pricing-side {
  padding: 16px;
  background: #fcfdfd;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  text-align: right;
}

@media (max-width: 800px) {
  .hotel-pricing-side {
    border-left: none;
    border-top: 1px solid var(--border);
    flex-direction: row;
    align-items: center;
    text-align: left;
  }
}

.review-badge-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.review-score-box {
  background: #0f766e;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 6px 6px 6px 0;
}

.review-meta-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.price-night-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.price-night-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
}

.price-total-hint {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 2px;
}

.btn-book {
  display: inline-block;
  background: var(--primary);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 18px;
  border-radius: 6px;
  margin-top: 12px;
  transition: all 0.2s;
  text-align: center;
}

.btn-book:hover {
  background: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

/* Loading & Empty States */
.state-container {
  background: white;
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #ccfbf1;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.state-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.state-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}
