/* ========================================
   租赁页面 —— 筛选栏
   ======================================== */
.filter-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 2rem 0;
  border-bottom: 2px solid var(--border-color);
}

.filter-btn {
  padding: 0.75rem 1.75rem;
  border: 2px solid var(--primary);
  background-color: white;
  color: var(--primary);
  border-radius: 2rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.filter-btn:hover {
  background-color: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
  transform: translateY(-2px);
}

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

/* 车辆网格 */
.vehicles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.vehicle-item {
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.vehicle-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  position: relative;
}

.vehicle-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--accent);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.vehicle-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.vehicle-info h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.vehicle-specs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: #666;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.spec-label {
  font-weight: 600;
}

.vehicle-footer {
  display: flex;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
}

.vehicle-footer .btn {
  flex: 1;
  text-align: center;
}

/* 配套服务卡片 */
.included-card {
  background: white;
  padding: 2rem;
  border-radius: 0.5rem;
  border-left: 4px solid var(--accent);
  text-align: center;
  box-shadow: var(--shadow);
}

.included-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.included-icon-img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  display: inline-block;
}

.included-card h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.included-card p {
  color: #666;
  font-size: 0.95rem;
}

/* ========================================
   响应式 —— 租赁页面
   ======================================== */
@media (max-width: 768px) {
  .vehicles-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-specs {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
}

/* ========================================
   模型详情页
   ======================================== */
.model-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.model-detail-image {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.model-detail-image img {
  width: 100%;
  height: 400px;
  object-fit: contain;
  display: block;
}

.detail-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  align-self: stretch;
}

.detail-carousel-track {
  display: flex;
  align-items: center;
  transition: transform 0.4s ease;
  height: 100%;
}

.detail-carousel-track img {
  min-width: 100%;
  flex-shrink: 0;
}

.detail-carousel .carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s;
}

.detail-carousel:hover .carousel-btn {
  opacity: 1;
}

.detail-carousel .carousel-btn.prev {
  left: 8px;
}

.detail-carousel .carousel-btn.next {
  right: 8px;
}

.detail-carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.detail-carousel-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.3s;
}

.detail-carousel-dots .dot.active {
  background: white;
}

/* ========================================
   预订弹窗
   ======================================== */
.booking-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.booking-modal {
  background: white;
  border-radius: 0.5rem;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.booking-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.booking-modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.booking-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #999;
  padding: 0.25rem;
}

.booking-close:hover {
  color: var(--primary);
}

.booking-modal-body {
  padding: 1.5rem;
}

.booking-modal-body .form-group {
  margin-bottom: 1rem;
}

.booking-modal-body .form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: #555;
}

.booking-modal-body .form-group input,
.booking-modal-body .form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 0.4rem;
  font-family: inherit;
  font-size: 1rem;
  box-sizing: border-box;
}

.booking-modal-body .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.booking-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* ========================================
   预订页
   ======================================== */
.booking-model-summary {
  background: white;
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.booking-model-image {
  width: 200px;
  flex-shrink: 0;
}

.booking-model-image img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 0.4rem;
}

.booking-model-info {
  flex: 1;
}

.booking-model-info h2 {
  margin-bottom: 0.25rem;
}

.booking-model-brand {
  color: #666;
  margin-bottom: 0.5rem;
}

.booking-model-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.model-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.model-spec {
  font-size: 0.85rem;
  color: #666;
  background: #f5f5f5;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
}

@media (max-width: 768px) {
  .booking-model-summary {
    flex-direction: column;
    text-align: center;
  }
  .booking-model-image {
    width: 100%;
    max-width: 300px;
  }
  .model-specs {
    justify-content: center;
  }
}

.booking-section {
  background: white;
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.booking-section h3 {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.booking-section .form-group {
  margin-bottom: 1rem;
}

.booking-section .form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: #555;
}

.booking-section .form-group input,
.booking-section .form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 0.4rem;
  font-family: inherit;
  font-size: 1rem;
  box-sizing: border-box;
}

.booking-section .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.booking-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.booking-skeleton {
  background: white;
  border-radius: 0.5rem;
  padding: 3rem;
  box-shadow: var(--shadow);
}

/* 承租人搜索 */
.lessee-search-row {
  display: flex;
  gap: 0.5rem;
}
.lessee-search-row input { flex: 1; }
.lessee-hint { display: block; font-size: 0.85rem; color: #888; margin-top: 0.5rem; }
.lessee-hint.lessee-selected { color: #4caf50; font-weight: 600; }
.lessee-result-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.6rem 0.75rem; border: 1px solid #e0e0e0; border-radius: 6px;
  margin-top: 0.5rem; cursor: pointer; transition: background 0.2s;
}
.lessee-result-item:hover { background: #f5f5f5; }
.lessee-result-item.lessee-selected {
  background: #e8f4e8;
  border-color: #4caf50;
}
.lessee-result-item.lessee-selected .lessee-result-name::after {
  content: ' ✓';
  color: #4caf50;
  font-weight: 700;
}
.lessee-result-name { font-weight: 600; }
.lessee-result-phone { color: #888; font-size: 0.85rem; }
.lessee-divider { height: 1px; background: #e0e0e0; margin: 1rem 0; }
.required { color: #e53e3e; }

/* 装备选择 */
.equipment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.equipment-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.75rem; border: 1px solid #e0e0e0; border-radius: 6px;
  cursor: pointer; transition: border-color 0.2s; font-size: 0.9rem;
}
.equipment-item:hover { border-color: #1a1a1a; }
.equipment-item input { width: 16px; height: 16px; }
.equipment-name { flex: 1; }
.equipment-price { color: #e53e3e; font-weight: 600; white-space: nowrap; }
.equipment-free { color: #4caf50; font-size: 0.8rem; }
@media (max-width: 600px) { .equipment-grid { grid-template-columns: 1fr; } }

/* ========================================
   登录页
   ======================================== */
.login-box {
  max-width: 420px;
  margin: 0 auto;
  background: white;
  border-radius: 0.5rem;
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.login-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.login-tab {
  padding: 0.6rem 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: 2rem;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.login-tab.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--primary);
  font-weight: 600;
}

.login-field {
  margin-bottom: 1.5rem;
}

.login-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #555;
}

.login-input-row {
  display: flex;
  align-items: center;
  border: 2px solid var(--border-color);
  border-radius: 0.4rem;
  overflow: hidden;
}

.country-code {
  padding: 0.75rem 1rem;
  background: #f5f5f5;
  font-weight: 600;
  font-size: 0.95rem;
  border-right: 1px solid var(--border-color);
  white-space: nowrap;
}

.login-input-row input,
.login-field input[type="email"],
.login-field input[type="tel"] {
  flex: 1;
  padding: 0.75rem;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.login-sent-to {
  text-align: center;
  font-weight: 600;
  margin-bottom: 2rem;
  color: #555;
}

.otp-container {
  position: relative;
  margin-bottom: 2rem;
}

.otp-input {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 2;
  cursor: text;
}

.otp-display {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.otp-slot {
  width: 50px;
  height: 56px;
  border-radius: 0.4rem;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  background: #fafafa;
  transition: border-color 0.3s;
}

.otp-slot:not(:empty) {
  border-color: var(--accent);
}

.resend-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: #666;
}

.resend-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  text-decoration: underline;
}

.resend-btn:disabled {
  color: #999;
  cursor: not-allowed;
}

.model-detail-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.detail-specs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0;
  user-select: none;
}

.detail-specs-header:hover {
  color: var(--primary);
  opacity: 0.7;
}

.detail-specs-arrow {
  font-size: 1rem;
  transition: transform 0.2s;
}

.model-detail-info h2 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.model-detail-brand {
  color: #666;
  margin-bottom: 0.5rem;
}

.model-detail-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.model-detail-rows {
  flex: 1;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.detail-label {
  color: #666;
  font-weight: 600;
}

.detail-value {
  color: var(--primary);
  text-align: right;
}

@media (max-width: 768px) {
  .model-detail {
    grid-template-columns: 1fr;
  }
  .model-detail-image img {
    height: 220px;
  }
}

/* ========================================
   车型列表页（models.html）— 横向列表样式
   ======================================== */
.models-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.model-list-item {
  display: flex;
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.model-list-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.model-list-img {
  width: 300px;
  flex-shrink: 0;
}

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

.model-list-body {
  flex: 1;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
}

.model-list-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.model-list-head h3 {
  color: var(--primary);
  font-size: 1.4rem;
  margin: 0;
}

.model-list-brand {
  color: #999;
  font-size: 0.9rem;
}

.model-list-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.model-list-spec {
  background: #f5f5f5;
  padding: 0.4rem 0.9rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  color: #333;
}

.model-list-spec i {
  font-style: normal;
  color: #999;
  margin-right: 0.4rem;
}

.model-list-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.model-list-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.model-list-actions {
  display: flex;
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .model-list-item {
    flex-direction: column;
  }
  .model-list-img {
    width: 100%;
    height: 200px;
  }
  .model-list-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* ========================================
   规格 SVG 图标
   ======================================== */
.spec-icon {
  width: 1rem;
  height: 1rem;
  vertical-align: -0.15em;
  margin-right: 0.25rem;
  flex-shrink: 0;
}

.model-list-spec .spec-icon {
  vertical-align: -0.2em;
  margin-right: 0.3rem;
}
