/* assets/style.css */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f5f5;
  color: #333;
}
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
}

/* ===== Header ===== */
.site-header {
  background: #ffffff;               /* 白色背景 */
  color: #333;
  border-bottom: 1px solid #e5e5e5;  /* 微小下边框 */
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 18px;
  font-weight: 600;
}
.site-logo-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #007bff10;
  border: 1px solid #007bff40;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  color: #007bff;
}

/* 头部语言选择：改为下拉选择 */
.lang-switch {
  display: flex;
  align-items: center;
}
.lang-switch select {
  padding: 0.3rem 0.6rem;
  border-radius: 0.3rem;
  border: 1px solid #ccc;
  font-size: 0.9rem;
  background: #fff;
}

/* ===== Main & Footer ===== */
.site-main {
  min-height: 70vh;
}
.site-footer {
  background: #f5f5f5;  /* 和 body 一样 */
  color: #666;
  text-align: center;
  padding: .5rem 0;
  font-size: .8rem;
  border-top: 1px solid #e5e5e5;
}

/* ===== Hero (index.php) ===== */
.hero {
  text-align: center;
  padding: 3rem 1rem 1rem 1rem ;
  min-height: calc(100vh - 150px);  /* 粗略减去 header + footer 高度，居中 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.hero-logo {
  width: 250px;
  height: 250px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.hero p {
  margin: 0.5rem 0;
}
.hero-main-button {
  margin-top: 1rem;
}
.hero-lang-buttons {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.btn-lang {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 0.9rem;
  text-decoration: none;
  color: #333;
}
.btn-lang.active {
  border-color: #007bff;
  color: #007bff;
  font-weight: 600;
}

/* ===== Buttons ===== */
.btn-primary,
.btn-secondary,
.btn-danger {
  display: inline-block;
  padding: .6rem 1.2rem;
  border-radius: .3rem;
  border: none;
  cursor: pointer;
  font-size: 18px;
  text-decoration: none;
  text-align: center;
}
.btn-primary {
  background: #007bff;
  color: #fff;
}
.btn-primary:hover {
  background: #0056b3;
}
.btn-secondary {
  background: #e0e0e0;
  color: #333;
}
.btn-danger {
  background: #dc3545;
  color: #fff;
}

/* ===== Steps & Forms ===== */
.steps-indicator {
  margin: 1rem 0;
  font-weight: bold;
}

.form-section {
  background: #fff;
  padding: 1rem;
  border-radius: .5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,.05);
  margin-bottom: 1rem;
}
.form-row {
  margin-bottom: .75rem;
}
.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: .25rem;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 90%;
  padding: .5rem;
  border-radius: .3rem;
  border: 1px solid #ccc;
  font-size: 1rem;
}

/* ===== Bike cards ===== */
.bike-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.bike-card {
  border: 1px solid #eee;
  border-radius: .5rem;
  padding: .75rem;
  background: #fafafa;
  display: flex;
  gap: .75rem;
}
.bike-image {
  width: 80px;
  height: 80px;
  background: #ddd;
  border-radius: .25rem;
  flex-shrink: 0;
}
.bike-info {
  flex: 1;
}
.bike-name {
  font-weight: bold;
  margin-bottom: .25rem;
}
.bike-desc {
  font-size: .9rem;
  margin-bottom: .25rem;
}
.bike-price {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: .5rem;
}
.qty-control {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.qty-control button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}
.qty-control input {
  width: 50px;
  text-align: center;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: space-between;
  margin-top: 1rem;
}

.error-box {
  background: #ffe5e5;
  color: #a00;
  border: 1px solid #f5c2c2;
  padding: .75rem;
  border-radius: .3rem;
  margin-bottom: 1rem;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}
.summary-table th,
.summary-table td {
  border: 1px solid #ddd;
  padding: .5rem;
  font-size: .95rem;
}
.summary-table th {
  background: #f0f0f0;
  text-align: left;
}

/* 表格外层 wrapper，用于小屏横向滚动 */
.summary-table-wrapper {
  width: 100%;
  overflow-x: auto;   /* 超出宽度时可以左右滚动 */
}

/* 手机端优化表格字体和间距 */
@media (max-width: 599px) {
  .summary-table th,
  .summary-table td {
    padding: 0.35rem 0.4rem;
    font-size: 14px;
    white-space: nowrap;  /* 不换行，避免竖着挤成两行 */
  }

  /* 让表格至少有一定宽度，不会挤到一团 */
  .summary-table {
    min-width: 520px;     /* 根据你列数调整，5列的话 500~600 px 比较合适 */
  }
}

/* ===== Responsive ===== */
@media (min-width: 600px) {
  .bike-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .bike-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}/* ===== Step1: layout & style ===== */

/* 标题和小标题 */
.step-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.step-subtitle {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: #666;
}

/* form-section 的头部 */
.form-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.form-section-header h2 {
  margin:0 0 10px 0 ;
  font-size: 18px;
}

.form-section-note {
  margin: 0;
  font-size: 14px;
  color: #888;
}

/* 车型选择区块 */
.form-section-bikes {
  margin-top: 0.5rem;
}

/* 日期 + 时间块 */
.form-section-datetime {
  margin-top: 1rem;
}

/* 两列排版：PC 两列，手机自动一列 */
.form-row-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.form-row-half {
  flex: 1 1 220px;
}

/* ===== 车型卡片：所有设备都相同布局（图片在上、文字在下） ===== */

.form-section-bikes .bike-card {
  display: flex;
  flex-direction: column;        /* 竖排：图片在上，信息在下 */
  align-items: stretch;
  border: 1px solid #eee;
  border-radius: .5rem;
  padding: .8rem;
  background: #fafafa;
}

/* 图片在最上面，宽度 100%，固定高度 */
.form-section-bikes .bike-image {
  width: 100%;
  height: 175px;
  border-radius: 0.4rem;
  background: #ddd;
  margin-bottom: 0.6rem;
  overflow: hidden;              /* 保住圆角，图片不溢出 */
}

/* 让 <img> 自适应填满、居中裁剪 */
.form-section-bikes .bike-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 下面这块竖排：名称 -> 说明 -> 价格 -> 数量控制 */
.form-section-bikes .bike-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-section-bikes .bike-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.98rem;
}

.form-section-bikes .bike-desc {
  font-size: 14px;
  color: #555;
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.form-section-bikes .bike-price {
  font-size: 14px;
  color: red;
  margin-bottom: 0.4rem;
}

/* 数量控制整体占一行，在信息块底部、靠右 */
.bike-footer-row {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* 数量控制条本身 */
.qty-control {
  display: flex;
  align-items: center;
  gap: .3rem;
}

.qty-control button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.qty-control input {
  width: 54px;
  text-align: center;
  padding: 0.25rem 0.2rem;
  font-size: 0.95rem;
}

/* 日期时间间距微调 */
.form-section-datetime .form-row-inline + .form-row-inline {
  margin-top: 0.5rem;
}

/* 大屏适当放大图片高度 */
@media (min-width: 768px) {
  .form-section-bikes .bike-card {
    padding: 1rem;
  }

  .form-section-bikes .bike-image {
    height: 170px;
  }

  .form-section-bikes .bike-name {
    font-size: 1rem;
  }
}

/* 小屏微调字号、按钮大小 */
@media (max-width: 599px) {
  .form-section-bikes .bike-card {
    padding: 0.9rem;
  }

  .form-section-bikes .bike-name {
    font-size: 1rem;
  }

  .form-section-bikes .bike-desc {
    font-size: 14px;
  }

  .qty-control button {
    width: 34px;
    height: 34px;
    font-size: 1.2rem;
  }

  .qty-control input {
    width: 60px;
    font-size: 1rem;
  }
}
.hero-location {
    margin-top: 1.8rem;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.6;
}

.hero-address span {
    font-weight: 500;
}

.hero-map-link {
    display: inline-block;
    margin-top: 0.2rem;
    text-decoration: underline;
    cursor: pointer;
}

.hero-map-link:hover {
    text-decoration: none;
}

/* =========================
   QRコードページ
   ========================= */
.qrcode-wrapper {
    /* 让内容区域尽量占满屏幕高度，减去大概的头部+底部 */
    min-height: calc(100vh - 150px);
    display: flex;
    align-items: center;    /* 垂直居中 */
    justify-content: center;/* 水平居中 */
}

.qrcode-box {
    text-align: center;
    padding: 24px 16px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    max-width: 360px;
    width: 100%;
}

.qrcode-title {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.qrcode-text {
    font-size: 0.95rem;
    margin-bottom: 16px;
    color: #555;
}

.qrcode-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode-image {
    max-width: 220px;
    /*max-height: 220px;*/
    width: 100%;
    height: auto;
}
