/* IDF 个人中心：左侧导航 + 卡片式内容，沿用主题主色 #658387 与 Heebo / Jost 字体 */
.idf-account {
  /* 主题面包屑是 float 且外层未清除，不清除时手机端横向导航（flex）会被挤出屏幕 */
  clear: both;
  margin-top: 10px;
  margin-bottom: 50px;
}

/* 带 #content 以压过主题里 .account-account #content h2 等页面级规则 */
#content.idf-account-main h2 {
  font-family: 'Jost', sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #222;
  margin: 0 0 20px;
}

/* ---------- 导航 ---------- */
.idf-account-nav {
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.idf-account-nav-title {
  font-family: 'Jost', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #222;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.idf-account-nav ul {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.idf-account-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: #444;
  font-size: 15px;
  border-left: 3px solid transparent;
  transition: background-color .2s, color .2s;
}

.idf-account-nav li a i {
  width: 18px;
  text-align: center;
  color: #658387;
  font-size: 16px;
}

.idf-account-nav li a:hover {
  background: #f4f7f7;
  color: #000;
}

.idf-account-nav li.active a {
  background: #eef3f3;
  border-left-color: #658387;
  color: #000;
  font-weight: 500;
}

.idf-account-nav li.idf-account-nav-logout {
  border-top: 1px solid #eee;
  margin-top: 8px;
  padding-top: 8px;
}

.idf-account-nav li.idf-account-nav-logout a,
.idf-account-nav li.idf-account-nav-logout a i {
  color: #a94442;
}

/* ---------- 账户首页 ---------- */
.idf-account-profile {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px;
  border-radius: 8px;
  background: #eef3f3;
  margin-bottom: 24px;
}

.idf-account-avatar {
  position: relative;
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
}

.idf-account-avatar img,
.idf-account-initial {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
}

.idf-account-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #658387;
  color: #fff;
  font-family: 'Jost', sans-serif;
  font-size: 36px;
  font-weight: 600;
}

.idf-account-initial.hidden,
.idf-account-avatar img.hidden {
  display: none;
}

.idf-account-avatar #button-avatar {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  color: #658387;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}

.idf-account-profile-text {
  flex: 1;
  min-width: 0;
}

.idf-account-profile-text h2 {
  margin-bottom: 6px;
}

.idf-account-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0 0 8px;
  color: #444;
  word-break: break-all;
}

.idf-account-contact i {
  color: #658387;
  margin-right: 4px;
}

.idf-account-intro,
.idf-account-group {
  margin: 0;
  color: #666;
}

.idf-account-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.idf-account-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 120px;
  padding: 20px 12px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 15px;
  text-align: center;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.idf-account-card i {
  font-size: 28px;
  color: #658387;
}

.idf-account-card:hover,
.idf-account-card:focus {
  color: #000;
  border-color: #658387;
  box-shadow: 0 4px 14px rgba(101, 131, 135, .18);
  transform: translateY(-2px);
}

.idf-account-panel {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
}

.idf-account-panel h3 {
  font-size: 16px;
  margin: 0 0 10px;
}

/* ---------- 各页面内容 ---------- */
.idf-account-main .table-bordered,
.idf-account-main .table-bordered > tbody > tr > td,
.idf-account-main .table-bordered > tbody > tr > th {
  border-color: #e6e6e6;
}

.idf-account-main .order-wrapper .table {
  border-radius: 8px;
  overflow: hidden;
}

.idf-account-main .order-wrapper .heading td {
  background: #f7f9f9;
  color: #333;
}

.idf-account-main .order-wrapper .product .image img {
  border-radius: 4px;
}

.idf-account-main .order-button-group {
  border-bottom: 1px solid #e6e6e6;
  text-align: left;
}

/* 主题用 a::after 画实心选中块，个人中心改用下划线 */
.idf-account-main .order-button-group > li > a::after {
  display: none;
}

.idf-account-main .order-button-group > li > a {
  padding: 10px 18px;
}

.idf-account-main .order-button-group > li > a {
  color: #666;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  margin-bottom: -1px;
}

.idf-account-main .order-button-group > li.active > a,
.idf-account-main .order-button-group > li.active > a:hover,
.idf-account-main .order-button-group > li > a:hover {
  color: #000;
  background: none;
  border: none;
  border-bottom: 2px solid #658387;
}

.idf-account-main .address-text {
  line-height: 1.7;
  color: #444;
}

.idf-account-main .address-text .label-success {
  background: #658387;
  border-radius: 10px;
  padding: 3px 8px;
  margin-left: 6px;
  font-weight: 400;
  vertical-align: 1px;
}

.idf-account-main .form-control {
  height: 42px;
  border-color: #ddd;
  border-radius: 6px;
  box-shadow: none;
}

.idf-account-main .form-control:focus {
  border-color: #658387;
  box-shadow: 0 0 0 3px rgba(101, 131, 135, .15);
}

.idf-account-main .no-items {
  text-align: center;
  padding: 40px 0 10px;
  color: #666;
}

.idf-account-main .no-items img {
  margin: 0 auto 12px;
  max-width: 160px;
}

.idf-account-empty-action {
  text-align: center;
  margin-bottom: 30px;
}

/* ---------- 手机端：导航改为顶部横向滚动 ---------- */
@media (max-width: 767px) {
  .idf-account-aside {
    margin-bottom: 20px;
  }

  .idf-account-nav {
    border: none;
    border-radius: 0;
    background: none;
  }

  .idf-account-nav-title {
    display: none;
  }

  .idf-account-nav ul {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 6px;
    -webkit-overflow-scrolling: touch;
  }

  .idf-account-nav li,
  .idf-account-nav li.idf-account-nav-logout {
    flex: 0 0 auto;
    border: none;
    margin: 0;
    padding: 0;
  }

  .idf-account-nav li a {
    padding: 8px 14px;
    border: 1px solid #e6e6e6;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
  }

  .idf-account-nav li.active a {
    border-color: #658387;
    background: #658387;
    color: #fff;
  }

  .idf-account-nav li.active a i {
    color: #fff;
  }

  .idf-account-profile {
    flex-direction: column;
    text-align: center;
    padding: 24px 16px;
  }

  .idf-account-contact {
    justify-content: center;
  }

  .idf-account-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .idf-account-card {
    min-height: 100px;
  }
}

/* ---------- 订单操作按钮：等宽、竖向排列留间距，View 为描边次按钮 ---------- */
.idf-account-main .order-edit .btn {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 13px;
  line-height: 1.4;
}

.idf-account-main .order-edit > :last-child {
  margin-bottom: 0;
}

.idf-account-main .idf-btn-outline {
  background: #fff;
  border: 1px solid #658387;
  border-radius: 30px;
  color: #658387;
}

.idf-account-main .idf-btn-outline:hover,
.idf-account-main .idf-btn-outline:focus {
  background: #658387;
  color: #fff;
}

/* ---------- 状态标签：浅底深字圆角，订单列表与详情共用 ---------- */
.idf-account-main .status-badge,
.idf-account-main .payment-status,
.idf-account-main .shipping-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .3px;
  background: #eef0f2;
  color: #555;
}

.idf-account-main .order-status-pending,
.idf-account-main .payment-status-pending,
.idf-account-main .shipping-status-pending {
  background: #fff4e0;
  color: #9a5b00;
}

.idf-account-main .payment-status-unpaid,
.idf-account-main .order-status-canceled,
.idf-account-main .payment-status-canceled {
  background: #fdecea;
  color: #b3382c;
}

.idf-account-main .order-status-processing,
.idf-account-main .shipping-status-processing {
  background: #e6f2f8;
  color: #1f6a8c;
}

.idf-account-main .order-status-completed,
.idf-account-main .payment-status-paid,
.idf-account-main .payment-status-completed,
.idf-account-main .shipping-status-delivered,
.idf-account-main .shipping-status-picked_up {
  background: #e7f4ea;
  color: #2b7a40;
}

.idf-account-main .payment-status-shipped,
.idf-account-main .shipping-status-shipped {
  background: #e3f3f5;
  color: #13707e;
}

.idf-account-main .shipping-status-ready_pickup {
  background: #f1eafa;
  color: #6a3d9a;
}

/* ---------- 订单详情 ---------- */
.idf-order section,
.idf-order .idf-order-card {
  margin-bottom: 20px;
}

.idf-order-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 24px;
  padding: 24px 28px;
  border-radius: 8px;
  background: #eef3f3;
}

#content.idf-account-main .idf-order-summary h2 {
  margin: 0 0 4px;
}

.idf-order-date {
  margin: 0;
  color: #666;
}

.idf-order-summary-action {
  align-self: center;
}

.idf-order-summary-action .btn {
  padding: 10px 28px;
  font-size: 15px;
}

.idf-order-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 40px;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid #dbe5e5;
}

.idf-order-meta dt,
.idf-order-info-list dt {
  font-size: 12px;
  font-weight: 500;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.idf-order-meta dd {
  margin-top: 4px;
  color: #222;
  font-size: 15px;
}

.idf-order-proof {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.idf-order-proof img {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.idf-order-proof small {
  display: block;
  color: #777;
}

.idf-order-notice {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
  border-left: 4px solid;
  border-radius: 6px;
}

.idf-order-notice > i {
  font-size: 20px;
  margin-top: 2px;
}

.idf-order-notice strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.idf-order-notice p {
  margin: 0;
  line-height: 1.6;
}

.idf-order-notice .idf-order-notice-strong {
  margin-top: 6px;
  font-weight: 500;
}

.idf-order-notice-danger {
  background: #fdf2f1;
  border-color: #d9534f;
  color: #8a2d26;
}

.idf-order-notice-danger > i {
  color: #d9534f;
}

.idf-order-notice-warning {
  background: #fff8ec;
  border-color: #f0ad4e;
  color: #7a5000;
}

.idf-order-notice-warning > i {
  color: #f0ad4e;
}

.idf-order-card {
  padding: 22px 24px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fff;
}

.idf-order-card-title {
  font-family: 'Jost', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: #222;
  margin: 0 0 16px;
}

.idf-order-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.idf-order-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #f0f0f0;
}

.idf-order-item:first-child {
  border-top: none;
  padding-top: 0;
}

.idf-order-item-image {
  flex: 0 0 84px;
}

.idf-order-item-image img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 6px;
  background: #f5f5f5;
}

.idf-order-item-info {
  flex: 1;
  min-width: 0;
}

.idf-order-item-name {
  display: block;
  color: #222;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.idf-order-item-name:hover {
  color: #658387;
}

.idf-order-item-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin-top: 4px;
  font-size: 13px;
  color: #888;
}

.idf-order-item-qty {
  margin-top: 4px;
  color: #555;
}

.idf-order-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.idf-order-item-actions .btn {
  padding: 4px 14px;
  font-size: 13px;
}

.idf-order-item-total {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 500;
  color: #222;
}

.idf-order-suite-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.idf-order-suite-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 13px;
  color: #666;
}

.idf-order-suite-list img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

.idf-order-totals {
  margin: 16px 0 0 auto;
  padding-top: 16px;
  border-top: 1px solid #eee;
  max-width: 320px;
}

.idf-order-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 0;
  color: #555;
}

.idf-order-totals dt {
  font-weight: 400;
}

.idf-order-totals .idf-order-grand-total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  font-size: 18px;
  font-weight: 600;
  color: #222;
}

.idf-order-totals .idf-order-grand-total dt {
  font-weight: 600;
}

.idf-order-totals .idf-order-gst {
  justify-content: flex-end;
  padding-top: 0;
  font-size: 12px;
  color: #888;
}

.idf-order-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.idf-order .idf-order-grid > .idf-order-card {
  margin-bottom: 0;
}

.idf-order-pickup {
  grid-column: 1 / -1;
}

.idf-order-pickup-code {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 20px;
  margin-bottom: 16px;
  border: 1px dashed #658387;
  border-radius: 8px;
  background: #f4f8f8;
}

.idf-order-pickup-code span {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.idf-order-pickup-code strong {
  font-family: 'Jost', sans-serif;
  font-size: 26px;
  letter-spacing: 3px;
  color: #222;
}

.idf-order-pickup-code.is-pending {
  border-color: #e3a5a0;
  background: #fdf5f4;
}

.idf-order-pickup-code.is-pending strong {
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  color: #b3382c;
}

.idf-order-info-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 28px;
  margin: 0;
}

.idf-order-info-list .idf-order-info-wide {
  grid-column: 1 / -1;
}

.idf-order-info-list dd {
  margin-top: 2px;
  color: #333;
  line-height: 1.6;
}

.idf-order-address {
  margin: 0;
  font-style: normal;
  line-height: 1.8;
  color: #333;
}

.idf-order-comment {
  margin: 0;
  color: #333;
  white-space: pre-line;
}

.idf-order-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 22px;
  position: relative;
}

.idf-order-timeline li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: -16px;
  top: 20px;
  bottom: -2px;
  width: 2px;
  background: #e3e8e8;
}

.idf-order-timeline li {
  position: relative;
  padding-bottom: 18px;
}

.idf-order-timeline li:last-child {
  padding-bottom: 0;
}

.idf-order-timeline li::before {
  content: '';
  position: absolute;
  left: -21px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #b9c7c8;
}

.idf-order-timeline li.is-latest::before {
  background: #658387;
  border-color: #658387;
}

.idf-order-timeline-status {
  font-weight: 500;
  color: #222;
}

.idf-order-timeline-date {
  font-size: 13px;
  color: #888;
}

.idf-order-timeline-comment {
  margin-top: 4px;
  color: #555;
}

@media (max-width: 767px) {
  .idf-order-summary {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .idf-order-summary-action .btn {
    width: 100%;
  }

  .idf-order-card {
    padding: 18px 16px;
  }

  .idf-order-item-image,
  .idf-order-item-image img {
    flex-basis: 64px;
    width: 64px;
    height: 64px;
  }

  .idf-order-item {
    flex-wrap: wrap;
  }

  .idf-order-item-total {
    margin-left: auto;
  }

  .idf-order-totals {
    max-width: none;
  }

  .idf-order-grid,
  .idf-order-info-list {
    grid-template-columns: 1fr;
  }
}
