/* ============================================
   各頁專屬樣式
   ============================================ */

/* === Step1: index.html === */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 720px;
  width: 100%;
  margin-top: 16px;
}

.choice-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all .3s cubic-bezier(.4,.0,.2,1);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

.choice-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.choice-card .emoji {
  font-size: 64px;
  margin-bottom: 16px;
  display: inline-block;
  transition: transform .3s;
}

.choice-card:hover .emoji { transform: scale(1.15) rotate(-6deg); }

.choice-card h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}

.choice-card p {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
}

.choice-card.disabled {
  cursor: default;
  pointer-events: none;
  /* 視覺上與保母接案卡一致（白底），只是不可點擊 */
}

@media (max-width: 600px) {
  .choice-grid { grid-template-columns: 1fr; gap: 16px; }
  .choice-card { padding: 28px 20px; }
  .choice-card .emoji { font-size: 48px; }
}

/* === Step2: pet-type.html === */
.pet-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 720px;
  width: 100%;
}
@media (max-width: 600px) {
  .pet-type-grid { grid-template-columns: 1fr; gap: 16px; max-width: 360px; }
}

.pet-type-btn {
  background: var(--card);
  border: 3px solid var(--bg-2);
  border-radius: var(--radius);
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  transition: all .25s;
  position: relative;
}
.pet-type-btn:hover {
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.pet-type-btn .pet-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}
.pet-type-btn:hover .pet-photo { transform: scale(1.06); }
.pet-type-btn .pet-label {
  padding: 18px 0 22px;
  background: #fff;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.pet-type-btn .pet-label .mini { font-size: 14px; color: var(--text-soft); font-weight: 500; }

/* === Step3: location.html === */
.location-wrap {
  width: 100%;
  max-width: 780px;
}

.search-bar {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--bg-2);
  background: #fff;
  border-radius: 14px;
  font-size: 16px;
  font-family: inherit;
  margin-bottom: 18px;
  transition: border-color .2s;
}
.search-bar:focus { outline: none; border-color: var(--primary); }

.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.city-btn {
  background: #fff;
  border: 2px solid var(--bg-2);
  border-radius: 12px;
  padding: 12px 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: all .2s;
  text-align: center;
}
.city-btn:hover {
  border-color: var(--primary);
  background: var(--bg-2);
  transform: scale(1.04);
}
.city-btn.selected {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: var(--primary-dark);
}

/* === Step4: searching.html (狗追骨頭) === */
.searching-stage {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: 200px;
  margin: 24px 0 30px;
  overflow: hidden;
}

.ground {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--text-soft) 0 8px, transparent 8px 16px);
  opacity: .35;
}

.dog-runner {
  position: absolute;
  bottom: 32px;
  font-size: 70px;
  animation: dog-run 1.8s linear infinite;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.15));
}
.bone-runner {
  position: absolute;
  bottom: 50px;
  font-size: 40px;
  animation: bone-run 1.8s linear infinite;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.15));
}

@keyframes dog-run {
  0%   { left: -10%; transform: scaleX(-1) translateY(0); }
  25%  { transform: scaleX(-1) translateY(-6px); }
  50%  { transform: scaleX(-1) translateY(0); }
  75%  { transform: scaleX(-1) translateY(-6px); }
  100% { left: 110%; transform: scaleX(-1) translateY(0); }
}
@keyframes bone-run {
  0%   { left: 5%; transform: rotate(-12deg); }
  50%  { transform: rotate(12deg); }
  100% { left: 125%; transform: rotate(-12deg); }
}

.searching-progress {
  width: 80%;
  max-width: 360px;
  height: 6px;
  background: var(--bg-2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}
.searching-progress .fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  transition: width .3s;
}

.searching-text {
  color: var(--text-soft);
  font-size: 15px;
  text-align: center;
}
.searching-text .dot-anim::after {
  content: '';
  animation: dots 1.4s steps(4, end) infinite;
}
@keyframes dots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}

/* === Step5: orders.html === */
.orders-header {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.orders-title-block { display: flex; flex-direction: column; gap: 4px; }
.orders-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
}
.orders-meta {
  font-size: 13px;
  color: var(--text-soft);
}
.orders-meta .live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  margin-right: 6px;
  animation: pulse 1.6s ease-out infinite;
  vertical-align: middle;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); }
  100% { box-shadow: 0 0 0 12px rgba(74, 222, 128, 0); }
}

.nav-buttons {
  display: flex;
  gap: 6px;
  margin-right: 12px;
}
.nav-btn {
  appearance: none;
  border: 1.5px solid transparent;
  background: rgba(255, 247, 238, 0.7);
  color: var(--text);
  padding: 7px 12px;
  border-radius: 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: #fff;
}
.nav-btn .nav-icon { font-size: 14px; }

@media (max-width: 760px) {
  .nav-buttons { display: none; }
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-pill {
  padding: 6px 14px;
  border-radius: 18px;
  background: #fff;
  border: 1.5px solid var(--bg-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: all .2s;
}
.filter-pill:hover { border-color: var(--primary); color: var(--primary-dark); }
.filter-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary-dark);
}

.orders-grid {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.order-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all .3s;
  display: flex;
  flex-direction: column;
  position: relative;
}
.order-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.order-card.fresh {
  animation: fresh-pop .6s ease-out;
}
@keyframes fresh-pop {
  0%   { transform: scale(.85); opacity: 0; }
  60%  { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1); }
}

.order-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--bg-2);
  display: block;
}

.order-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,.85);
  color: var(--text);
}
.badge.short { background: rgba(136, 201, 161, .92); color: #fff; }
.badge.long  { background: rgba(245, 168, 108, .92); color: #fff; }
.badge.urgent { background: rgba(239, 68, 68, .92); color: #fff; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.7} }

.order-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.order-name-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.pet-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
}
.pet-breed {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 500;
  margin-top: 2px;
}

.order-location {
  font-size: 13px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 4px;
}

.order-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}
.order-price {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary-dark);
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1.1;
}
.order-price .unit { font-size: 12px; font-weight: 600; color: var(--text-soft); }
.order-total {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 4px;
  white-space: nowrap;
}
.order-total strong { color: var(--secondary-dark); font-weight: 700; }

.order-service {
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  padding: 8px 10px;
  border-radius: 8px;
  line-height: 1.5;
}

.req-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.req-chip {
  background: #FFF1E0;
  color: #B66C2A;
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.order-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.btn-sm {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  border-radius: 10px;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-soft);
}
.empty-state .emoji { font-size: 48px; display: block; margin-bottom: 12px; }
