/* ===== 宠物一站式服务平台 - 公共样式 ===== */

/* CSS Variables */
:root {
  --primary: #FF6B35;
  --primary-light: #FF8C5A;
  --primary-dark: #E55A2B;
  --secondary: #FFB347;
  --accent: #4ECDC4;
  --accent-dark: #3DB8B0;
  --bg-warm: #FFF8F0;
  --bg-cream: #F7F1E8;
  --bg-white: #FFFFFF;
  --text-dark: #2D3436;
  --text-medium: #636E72;
  --text-light: #B2BEC3;
  --border: #E8DDD1;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
  --max-width: 1200px;
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--text-dark);
  background: var(--bg-warm);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol { list-style: none; }

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

/* ===== Header / Navigation ===== */
.header {
  background: var(--bg-white);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-list a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-medium);
  font-weight: 500;
  font-size: 15px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--primary);
  background: rgba(255, 107, 53, 0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  white-space: nowrap;
  gap: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-secondary {
  background: var(--bg-cream);
  color: var(--text-dark);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
  border-radius: var(--radius);
}

.btn-sm {
  padding: 6px 16px;
  font-size: 13px;
}

/* Mobile menu toggle */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2.5px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Footer ===== */
.footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.7);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-brand .logo {
  color: white;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255,255,255,0.5);
}

.footer-col h4 {
  color: white;
  font-size: 16px;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  padding: 4px 0;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--secondary);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

.footer-bottom a {
  color: rgba(255,255,255,0.4);
}

.footer-bottom a:hover {
  color: var(--secondary);
}

.footer-icp a {
  color: rgba(255,255,255,0.4);
  transition: var(--transition);
}

.footer-icp a:hover {
  color: var(--secondary);
}

/* ===== Main Content ===== */
.main-content {
  flex: 1;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 60px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.section-header p {
  color: var(--text-medium);
  font-size: 16px;
}

.section-header .accent-line {
  width: 48px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  margin: 12px auto 0;
}

/* ===== Cards ===== */
.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg-cream);
}

.card-body {
  padding: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dark);
}

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

.card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== Grid ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ===== Tags / Badges ===== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.tag-primary {
  background: rgba(255, 107, 53, 0.1);
  color: var(--primary);
}

.tag-accent {
  background: rgba(78, 205, 196, 0.1);
  color: var(--accent-dark);
}

.tag-secondary {
  background: rgba(255, 179, 71, 0.15);
  color: #D4900E;
}

/* ===== Stars ===== */
.stars {
  color: #FFB347;
  font-size: 14px;
  letter-spacing: 2px;
}

.stars .empty {
  color: var(--border);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 16px 0;
  font-size: 14px;
  color: var(--text-medium);
}

.breadcrumb a {
  color: var(--text-medium);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span {
  margin: 0 8px;
  color: var(--text-light);
}

/* ===== Page Hero ===== */
.page-hero {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 48px 0;
  color: white;
  text-align: center;
}

.page-hero h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-hero p {
  font-size: 16px;
  opacity: 0.9;
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-dark);
}

.form-label .required {
  color: #E74C3C;
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-dark);
  background: var(--bg-white);
  transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23636E72' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

.form-hint {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ===== Filter Bar ===== */
.filter-bar {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.filter-row:last-child {
  border-bottom: none;
}

.filter-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dark);
  min-width: 80px;
  white-space: nowrap;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  background: var(--bg-cream);
  color: var(--text-medium);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.filter-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-chip.active {
  background: rgba(255, 107, 53, 0.1);
  color: var(--primary);
  border-color: var(--primary);
}

/* ===== Step Progress ===== */
.step-progress {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}

.step-item {
  display: flex;
  align-items: center;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  background: var(--bg-cream);
  color: var(--text-light);
  transition: var(--transition);
}

.step-item.active .step-circle {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.step-item.done .step-circle {
  background: var(--accent);
  color: white;
}

.step-label {
  margin-left: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
}

.step-item.active .step-label {
  color: var(--primary);
}

.step-item.done .step-label {
  color: var(--accent-dark);
}

.step-line {
  width: 60px;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
}

.step-item.done + .step-line,
.step-line.done {
  background: var(--accent);
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-cream);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-medium);
  text-align: center;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--bg-white);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ===== Search Box ===== */
.search-box {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
}

.search-input {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 14px;
}

.search-input:focus {
  border-color: var(--primary);
}

.search-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-weight: 600;
  transition: var(--transition);
}

.search-btn:hover {
  opacity: 0.9;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.page-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-medium);
  background: var(--bg-white);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.page-btn:hover,
.page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ===== Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-cream);
  font-size: 18px;
  color: var(--text-medium);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--border);
  color: var(--text-dark);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 768px) {
  .nav-list { display: none; }
  .mobile-menu-btn { display: flex; }
  
  .nav-list.show {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    padding: 16px;
    box-shadow: var(--shadow);
    gap: 4px;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section { padding: 40px 0; }
  .section-header h2 { font-size: 24px; }
  .page-hero { padding: 32px 0; }
  .page-hero h1 { font-size: 26px; }
  .form-row { flex-direction: column; gap: 0; }
  .step-progress { flex-wrap: wrap; gap: 8px; }
  .step-line { width: 30px; }
  .step-label { display: none; }
}

@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .header-inner { padding: 0 16px; }
  .container { padding: 0 16px; }
  .footer-inner { padding: 32px 16px 16px; }
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-medium { color: var(--text-medium); }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-cream);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}
