.account-order-history {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)), #0a0a0a;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  color: #fff;
  padding: clamp(28px, 4vw, 40px);
}

.account-order-head,
.account-order-toolbar {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.account-order-head {
  margin-bottom: 24px;
}

.account-order-head p {
  color: #d6a354;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.account-order-head h2 {
  color: #fff;
  font-size: clamp(28px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0;
}

.account-order-refresh {
  min-height: 44px;
}

.account-order-toolbar {
  align-items: flex-start;
  margin-bottom: 26px;
}

.account-order-search {
  align-items: center;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  flex: 0 1 330px;
  gap: 12px;
  min-height: 50px;
  padding: 0 16px;
  transition: border-color 220ms ease, background 220ms ease;
}

.account-order-search:focus-within {
  background: #141414;
  border-color: rgba(214, 163, 84, 0.72);
}

.account-order-search svg {
  fill: none;
  height: 20px;
  stroke: #9b9b9b;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 20px;
}

.account-center .account-order-search input {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #fff;
  font: inherit;
  min-height: auto;
  min-width: 0;
  outline: 0;
  padding: 0;
  width: 100%;
}

.account-center .account-order-search input:focus {
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: 0;
}

.account-order-search input::-webkit-search-cancel-button,
.account-order-search input::-webkit-search-decoration {
  -webkit-appearance: none;
}

.account-order-search input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.account-order-filters {
  display: flex;
  flex: 1 1 auto;
  gap: 8px;
  justify-content: flex-end;
  margin: 0;
  overflow-x: auto;
  padding: 0 0 6px;
  scrollbar-width: thin;
}

.account-order-filters button {
  align-items: center;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #9b9b9b;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  gap: 9px;
  min-height: 50px;
  padding: 0 18px;
  transition: background 220ms ease, border-color 220ms ease, color 220ms ease, transform 220ms ease;
  white-space: nowrap;
}

.account-order-filters button:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.account-order-filters button.active {
  background: rgba(214, 163, 84, 0.1);
  border-color: #d6a354;
  color: #fff;
}

.account-order-filters button b {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: inherit;
  display: inline-flex;
  font-size: 11px;
  justify-content: center;
  min-width: 22px;
  padding: 3px 7px;
}

.account-order-filters button.active b {
  background: #d6a354;
  color: #0a0a0a;
}

.account-order-card-list {
  display: grid;
  gap: 14px;
}

.account-order-card {
  animation: accountOrderFadeUp 240ms ease both;
  animation-delay: calc(var(--order-card-index, 0) * 45ms);
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  display: block;
  padding: clamp(18px, 2.4vw, 24px);
  transition: background 250ms ease, border-color 250ms ease, box-shadow 250ms ease, transform 250ms ease;
}

.account-order-card:hover {
  background: #151515;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
  transform: translateY(-3px);
}

.account-order-card-head {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: clamp(16px, 2.2vw, 24px);
  grid-template-columns: minmax(0, 1fr) 80px 120px;
  padding-bottom: 14px;
}

.account-order-card-head strong {
  color: #fff;
  display: block;
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.account-order-card-head span {
  color: #9b9b9b;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.account-order-product-row {
  align-items: center;
  display: grid;
  gap: clamp(16px, 2.2vw, 24px);
  grid-template-columns: 110px minmax(0, 1fr) 80px 120px;
  min-height: 126px;
  padding: 16px 0;
}

.account-order-product-row img {
  aspect-ratio: 1;
  background: #070707;
  border-radius: 12px;
  height: 110px;
  object-fit: cover;
  transition: transform 280ms ease, opacity 280ms ease;
  width: 110px;
}

.account-order-card:hover .account-order-product-row:first-of-type img {
  transform: scale(1.045);
}

.account-order-product-row strong {
  color: rgba(255, 255, 255, 0.9);
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.account-order-product-row span {
  color: #9b9b9b;
  display: block;
  font-size: 13px;
  line-height: 1.55;
  margin-top: 2px;
}

.account-order-product-row small,
.account-order-product-row em {
  color: #fff;
  display: block;
  font-size: 15px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  text-align: right;
}

.account-order-more-items {
  margin-top: 2px;
}

.account-order-more-items summary {
  align-items: center;
  color: #d6a354;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  list-style: none;
  min-height: 34px;
  padding: 0;
  transition: color 200ms ease;
}

.account-order-more-items summary::-webkit-details-marker {
  display: none;
}

.account-order-more-items summary::after {
  border-bottom: 1px solid currentColor;
  border-right: 1px solid currentColor;
  content: "";
  height: 7px;
  margin-left: 2px;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 200ms ease;
  width: 7px;
}

.account-order-more-items[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.account-order-more-items summary:hover {
  color: #f0c879;
}

.account-order-more-items summary b {
  align-items: center;
  background: rgba(214, 163, 84, 0.14);
  border-radius: 999px;
  color: inherit;
  display: inline-flex;
  font-size: 11px;
  justify-content: center;
  min-width: 20px;
  padding: 2px 7px;
}

.account-order-more-items[data-expanded="true"] summary {
  display: none;
}

.account-order-more-list {
  border-top: 0;
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding-top: 0;
}

.account-order-more-items[data-expanded="true"] .account-order-more-list {
  margin-top: 0;
}

.account-order-status {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  margin-top: 12px;
  padding: 8px 12px;
  white-space: nowrap;
}

.account-order-status-completed {
  background: rgba(91, 185, 119, 0.14);
  border-color: rgba(91, 185, 119, 0.26);
  color: #8bd39d;
}

.account-order-status-processing {
  background: rgba(88, 143, 214, 0.14);
  border-color: rgba(88, 143, 214, 0.26);
  color: #90b9ee;
}

.account-order-status-pending {
  background: rgba(214, 163, 84, 0.15);
  border-color: rgba(214, 163, 84, 0.32);
  color: #d6a354;
}

.account-order-status-shipped {
  background: rgba(149, 133, 229, 0.14);
  border-color: rgba(149, 133, 229, 0.25);
  color: #b8adf4;
}

.account-order-status-cancelled {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #b8b8b8;
}

.account-order-card-foot {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  gap: clamp(18px, 3vw, 32px);
  grid-template-columns: minmax(190px, 0.8fr) minmax(280px, 1.35fr) auto;
  padding-top: 18px;
}

.account-order-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.account-order-summary-list {
  display: grid;
  gap: 4px;
  margin: 0;
}

.account-order-summary-list div {
  display: grid;
  gap: 8px;
  grid-template-columns: 68px minmax(0, 1fr);
}

.account-order-summary-list dt,
.account-order-summary-list dd {
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
  margin: 0;
}

.account-order-summary-list dt {
  color: #9b9b9b;
}

.account-order-invoice-details {
  border: 1px solid rgba(213, 179, 106, 0.18);
  border-radius: 14px;
  margin-top: 18px;
  overflow: hidden;
}

.account-order-invoice-details summary {
  color: #d5b36a;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  list-style: none;
  padding: 14px 16px;
  text-transform: uppercase;
}

.account-order-invoice-details summary::-webkit-details-marker {
  display: none;
}

.account-order-invoice-details summary::after {
  content: "+";
  float: right;
}

.account-order-invoice-details[open] summary::after {
  content: "-";
}

.account-order-invoice-details dl {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 0;
  margin: 0;
  padding: 6px 16px 14px;
}

.account-order-invoice-details dl div {
  display: grid;
  gap: 8px;
  grid-template-columns: 108px minmax(0, 1fr);
  padding: 9px 0;
}

.account-order-invoice-details dt,
.account-order-invoice-details dd {
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.account-order-invoice-details dt {
  color: #9b9b9b;
}

.account-order-invoice-details dd {
  color: #fff;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.account-order-return-support-note,
.account-order-return-status {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 14px 0 0;
  padding-top: 14px;
}

.account-order-return-support-note {
  color: rgba(248, 241, 231, 0.52);
  font-size: 13px;
  line-height: 1.6;
}

.account-order-return-status {
  display: grid;
  gap: 10px;
}

.account-order-return-status strong {
  color: #f8f1e7;
  font-size: 14px;
}

.account-order-return-status > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-order-return-status small {
  color: rgba(248, 241, 231, 0.58);
  font-size: 12px;
  line-height: 1.5;
}

.account-order-progress {
  overflow: visible;
}

.account-order-progress-inner {
  --account-order-progress: 0%;
  --account-order-progress-axis: 43px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 96px;
  position: relative;
}

.account-order-progress-inner::before,
.account-order-progress-inner::after {
  content: "";
  height: 1px;
  left: 12.5%;
  position: absolute;
  right: 12.5%;
  top: var(--account-order-progress-axis);
}

.account-order-progress-inner::before {
  background: rgba(255, 255, 255, 0.18);
}

.account-order-progress-inner::after {
  background: #d6a354;
  right: auto;
  width: calc(var(--account-order-progress) * 0.75);
}

.account-order-progress-step {
  color: #9b9b9b;
  display: grid;
  grid-template-rows: 32px 22px minmax(24px, auto);
  justify-items: center;
  min-width: 0;
  position: relative;
  text-align: center;
  z-index: 1;
}

.account-order-progress-step span {
  align-self: end;
  color: #fff;
  font-size: 13px;
  line-height: 1.3;
}

.account-order-progress-step i {
  align-self: center;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  display: block;
  height: 18px;
  width: 18px;
}

.account-order-progress-step.active i {
  background: #d6a354;
  border-color: #d6a354;
}

.account-order-progress-step small {
  color: #9b9b9b;
  font-size: 12px;
  line-height: 1.2;
  margin-top: 4px;
}

.account-order-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-end;
}

.account-order-action {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(214, 163, 84, 0.42);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  font-weight: 800;
  gap: 12px;
  justify-content: center;
  min-height: 48px;
  min-width: 132px;
  padding: 0 18px;
  transition: background 220ms ease, border-color 220ms ease, color 220ms ease, transform 220ms ease;
}

.account-order-action:hover,
.account-order-card:hover .account-order-action {
  border-color: #d6a354;
}

.account-order-action:hover {
  background: #d6a354;
  color: #0a0a0a;
  transform: translateY(-1px);
}

.account-order-action-primary {
  background: #d6a354;
  border-color: #d6a354;
  color: #0a0a0a;
}

.account-order-empty {
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  display: grid;
  gap: 8px;
  min-height: 160px;
  place-content: center;
  text-align: center;
}

.account-order-empty strong {
  color: #fff;
  font-size: 18px;
}

.account-order-empty span {
  color: #9b9b9b;
}

.account-order-pagination {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 26px;
}

.account-order-pagination button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  height: 42px;
  justify-content: center;
  min-width: 42px;
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
}

.account-order-pagination button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.14);
}

.account-order-pagination button.active {
  border-color: #d6a354;
  color: #d6a354;
}

.account-order-pagination button:disabled {
  color: rgba(255, 255, 255, 0.24);
  cursor: default;
}

@keyframes accountOrderFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-order-card,
  .account-order-card *,
  .account-order-action,
  .account-order-filters button,
  .account-order-pagination button {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 1180px) {
  .account-order-card-foot {
    align-items: stretch;
    grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1fr);
  }

  .account-order-cta {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-end;
  }
}

@media (max-width: 900px) {
  .account-order-head,
  .account-order-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .account-order-search {
    flex-basis: auto;
    width: 100%;
  }

  .account-order-filters {
    justify-content: flex-start;
  }

  .account-order-card-head,
  .account-order-product-row {
    grid-template-columns: 96px minmax(0, 1fr) 58px 96px;
  }

  .account-order-card-head strong {
    grid-column: 1 / 3;
  }

  .account-order-product-row img {
    height: 96px;
    width: 96px;
  }

  .account-order-card-foot {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .account-order-history {
    border-radius: 12px;
    padding: 22px 16px;
  }

  .account-order-card {
    padding: 16px;
  }

  .account-order-card-head {
    grid-template-columns: minmax(0, 1fr) 48px 84px;
  }

  .account-order-card-head strong {
    grid-column: 1 / -1;
  }

  .account-order-product-row {
    align-items: start;
    grid-template-columns: 82px minmax(0, 1fr) 48px 84px;
    min-height: 96px;
  }

  .account-order-product-row img {
    height: 82px;
    width: 82px;
  }

  .account-order-product-row strong {
    font-size: 14px;
  }

  .account-order-product-row span {
    font-size: 12px;
  }

  .account-order-card-foot {
    gap: 18px;
  }

  .account-order-progress {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .account-order-progress-step span {
    font-size: 12px;
  }

  .account-order-action {
    width: 100%;
  }

  .account-order-filters button {
    min-height: 46px;
    padding: 0 14px;
  }
}

@media (max-width: 767px) {
  html,
  body,
  body[data-page="account"] {
    max-width: 100%;
    overflow-x: hidden;
  }

  .account-dashboard.account-center,
  .account-dashboard.account-center > .account-page-head,
  .account-dashboard.account-center > .account-tabs,
  .account-dashboard.account-center > .account-notice,
  .account-dashboard.account-center > .account-profile-form,
  .account-order-history,
  .account-order-card-list,
  .account-order-card,
  .account-order-card *,
  .account-order-toolbar,
  .account-order-search,
  .account-order-filters,
  .account-order-card-head,
  .account-order-product-row,
  .account-order-card-foot,
  .account-order-summary-block,
  .account-order-progress,
  .account-order-progress-inner,
  .account-order-cta {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
  }

  .account-dashboard.account-center {
    overflow-x: hidden;
    padding-left: 20px;
    padding-right: 20px;
    width: 100%;
  }

  .account-tabs {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .account-order-history {
    border-radius: 18px;
    overflow: hidden;
    padding: 24px 18px;
    width: 100%;
  }

  .account-order-head {
    align-items: stretch;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
  }

  .account-order-head h2 {
    font-size: 30px;
  }

  .account-order-refresh {
    justify-self: start;
    min-height: 44px;
  }

  .account-order-toolbar {
    align-items: stretch;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
  }

  .account-order-search {
    flex: none;
    width: 100%;
  }

  .account-order-filters {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    margin-left: -2px;
    margin-right: -2px;
    overflow-x: auto;
    padding: 0 2px 8px;
    scrollbar-width: none;
    width: calc(100% + 4px);
  }

  .account-order-filters::-webkit-scrollbar {
    display: none;
  }

  .account-order-filters button {
    flex: 0 0 auto;
    min-height: 46px;
    padding: 0 14px;
    white-space: nowrap;
  }

  .account-order-card-list {
    gap: 16px;
    width: 100%;
  }

  .account-order-card {
    border-radius: 18px;
    overflow: hidden;
    padding: 22px 18px;
    width: 100%;
  }

  .account-order-card:hover {
    box-shadow: none;
    transform: none;
  }

  .account-order-card-head {
    align-items: start;
    border-bottom: 0;
    display: grid;
    gap: 0;
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 12px;
  }

  .account-order-card-head strong {
    font-size: 14px;
    grid-column: auto;
    letter-spacing: 0.01em;
    line-height: 1.35;
    overflow-wrap: normal;
    white-space: nowrap;
    word-break: normal;
  }

  .account-order-card-head span {
    display: none;
  }

  .account-order-product-row {
    align-items: start;
    display: grid;
    gap: 14px;
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 0;
    padding: 14px 0;
  }

  .account-order-product-row img {
    border-radius: 12px;
    height: 96px;
    object-fit: cover;
    width: 96px;
  }

  .account-order-card:hover .account-order-product-row:first-of-type img {
    transform: none;
  }

  .account-order-product-row > div {
    min-width: 0;
  }

  .account-order-product-row strong {
    font-size: 16px;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .account-order-product-row span {
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .account-order-product-row small,
  .account-order-product-row em {
    color: #9b9b9b;
    font-size: 13px;
    grid-column: 2;
    justify-self: start;
    line-height: 1.45;
    margin-top: -8px;
    text-align: left;
  }

  .account-order-product-row small::before {
    content: "數量 ";
    color: #9b9b9b;
    font-weight: 700;
  }

  .account-order-product-row em {
    color: #fff;
    margin-top: -2px;
  }

  .account-order-product-row em::before {
    content: "小計 ";
    color: #9b9b9b;
    font-weight: 700;
  }

  .account-order-more-list {
    gap: 8px;
    margin-top: 0;
    padding-top: 0;
  }

  .account-order-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .account-order-card-foot {
    align-items: stretch;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr);
    padding-top: 16px;
  }

  .account-order-summary-list {
    gap: 10px;
  }

  .account-order-summary-list div {
    display: grid;
    gap: 12px;
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .account-order-summary-list dd {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .account-order-progress {
    overflow: visible;
    padding-bottom: 0;
    width: 100%;
  }

  .account-order-progress::-webkit-scrollbar {
    height: 0;
  }

  .account-order-progress {
    scrollbar-width: none;
  }

  .account-order-progress-inner {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 100%;
    min-height: 92px;
    min-width: 0;
    width: 100%;
  }

  .account-order-progress-inner::before,
  .account-order-progress-inner::after {
    left: 12.5%;
    right: 12.5%;
  }

  .account-order-progress-inner::after {
    width: calc(var(--account-order-progress) * 0.75);
  }

  .account-order-progress-step {
    min-width: 0;
  }

  .account-order-progress-step span {
    font-size: 12px;
    line-height: 1.25;
    max-width: 4.8em;
  }

  .account-order-progress-step small {
    font-size: 11px;
    max-width: 4.8em;
  }

  .account-order-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: 100%;
  }

  .account-order-action {
    min-height: 52px;
    min-width: 0;
    width: 100%;
  }

  .account-order-pagination {
    flex-wrap: wrap;
  }
}
.account-order-logistics-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(220, 168, 74, 0.16);
}

.account-order-logistics-panel .account-order-summary-list {
  margin-bottom: 12px;
}

@media (max-width: 767px) {
  .account-order-logistics-panel {
    margin-top: 14px;
  }
}
