.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: 0.2rem solid #fff;
  box-shadow: var(--h5-shadow-btn);
  font-weight: 700;
  text-align: center;
}

.btn-pill {
  border-radius: 999px;
}

.btn-red {
  background: linear-gradient(104deg, #f86864 0%, #ff4d47 100%);
  color: #fff;
}

.btn-yellow {
  background: linear-gradient(166deg, #ffe478 9%, #ffd115 61%);
  color: #333;
}

.btn-green {
  background: linear-gradient(104deg, #19ef6f 0%, #00ca85 100%);
  color: #fff;
}

.btn-md {
  width: auto;
  max-width: 100%;
  height: 4.8rem;
  padding: 0 3.6rem;
  font-size: 1.4rem;
  white-space: nowrap;
}

.btn-sm {
  height: 2.8rem;
  padding: 0 1.6rem;
  font-size: 1rem;
}

.btn-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 14.6rem;
  height: 3.4rem;
  border: 0.2rem solid #fff;
  border-radius: 0.6rem;
  background: var(--h5-tab-off);
  color: #333;
  font-size: 1.2rem;
}

.btn-tab img {
  width: 1.2rem;
  height: 1.2rem;
  object-fit: contain;
}

.btn-tab .iconfont {
  font-size: 1.4rem;
  line-height: 1;
}

.btn-tab:not(.is-on) img[src$=".png"] {
  filter: brightness(0);
  opacity: 0.7;
}

.btn-tab.is-on img[src$=".png"] {
  filter: brightness(0) invert(1);
}

.btn-tab.is-on {
  background: linear-gradient(104deg, #f86864 0%, #ff4d47 100%);
  color: #fff;
  box-shadow: 0.2rem 0.3rem 0 rgba(0, 0, 0, 0.4);
  font-weight: 700;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.field label {
  color: var(--h5-text);
  font-size: 1.4rem;
  line-height: 2.4rem;
}

.field select,
.field input {
  width: 100%;
  height: 3.6rem;
  padding: 0 0.8rem;
  border: 0.1rem solid var(--h5-border);
  border-radius: 0.4rem;
  background: #fff;
  color: var(--h5-text);
}

.field select {
  background-image: url("../assets/icons/chevron.svg");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 1.4rem;
  padding-right: 2.8rem;
}

.field select:invalid,
.field input::placeholder {
  color: var(--h5-placeholder);
}

.vehicle-search-hint {
  margin: 0.4rem 0 0;
  color: #888;
  font-size: 1.1rem;
  line-height: 1.6rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  padding: 0 1rem;
  border-radius: 999px;
  color: #333;
  font-size: 1rem;
  line-height: 1.4rem;
}

.tag.is-yellow { background: var(--h5-tag-yellow); }
.tag.is-green { background: var(--h5-tag-green); }
.tag.is-blue { background: var(--h5-tag-blue); }
.tag.is-pink { background: var(--h5-tag-pink); }

.sec-title {
  color: var(--h5-text);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 2.8rem;
  text-align: center;
}

.sec-lead {
  color: var(--h5-muted);
  font-size: 1.2rem;
  line-height: 2.2rem;
  text-align: center;
}

.btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  flex-shrink: 0;
  border-radius: 50%;
}

.btn-arrow .iconfont {
  font-size: 1.2rem;
  line-height: 1;
}

.btn-yellow .btn-arrow,
.rp-btn-yellow .btn-arrow {
  background: #111;
  color: #fff;
}

.btn-green .btn-arrow,
.rp-btn-green .btn-arrow {
  background: #fff;
  color: #00c300;
}

/* —— Site dialog (replaces native alert/confirm) —— */
body.h5-dialog-open {
  overflow: hidden;
}

.h5-dialog {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.4rem;
  background: rgba(17, 17, 17, 0.45);
  animation: h5-dialog-fade 0.18s ease;
}

.h5-dialog-card {
  width: min(32rem, 100%);
  padding: 2.4rem 1.8rem 2rem;
  background: #fff;
  border-radius: 1.2rem;
  box-shadow: 0 1.6rem 4rem rgba(0, 0, 0, 0.18);
  animation: h5-dialog-pop 0.2s ease;
}

.h5-dialog-title {
  margin: 0 0 0.8rem;
  color: #111;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 2.4rem;
  text-align: center;
}

.h5-dialog-message {
  margin: 0 0 2rem;
  color: #555;
  font-size: 1.3rem;
  line-height: 2rem;
  text-align: center;
  white-space: pre-wrap;
}

.h5-dialog-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 2rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid #ddd;
  border-radius: 1rem;
  background: #f7f7f8;
  color: #222;
  font-size: 1.4rem;
  font-family: inherit;
}

.h5-dialog-input:focus {
  outline: none;
  border-color: var(--h5-primary);
  background: #fff;
  box-shadow: 0 0 0 0.3rem rgba(255, 77, 71, 0.12);
}

.h5-dialog-actions {
  display: flex;
  gap: 1rem;
}

.h5-dialog-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 4.4rem;
  padding: 0 1.2rem;
  border: 0;
  border-radius: 999px;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.h5-dialog-cancel {
  background: #f2f3f5;
  color: #323233;
}

.h5-dialog-ok {
  background: linear-gradient(104deg, #f86864 0%, #ff4d47 100%);
  color: #fff;
}

.h5-dialog-ok.is-danger {
  background: linear-gradient(104deg, #f86864 0%, #ff4d47 100%);
}

@keyframes h5-dialog-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes h5-dialog-pop {
  from { opacity: 0; transform: translateY(1rem) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* —— Cart added success modal —— */
.h5-cart-added {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.4rem;
  background: rgba(17, 17, 17, 0.45);
  animation: h5-dialog-fade 0.18s ease;
}

.h5-cart-added-card {
  position: relative;
  width: min(34rem, 100%);
  padding: 3rem 2rem 2.2rem;
  background: #fff;
  border-radius: 1.6rem;
  box-shadow: 0 1.6rem 4rem rgba(0, 0, 0, 0.18);
  text-align: center;
  animation: h5-cart-added-pop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.h5-cart-added-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 2.8rem;
  height: 2.8rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.h5-cart-added-close::before,
.h5-cart-added-close::after {
  content: "";
  position: absolute;
  left: 0.6rem;
  top: 1.3rem;
  width: 1.6rem;
  height: 0.2rem;
  background: #999;
}

.h5-cart-added-close::before {
  transform: rotate(45deg);
}

.h5-cart-added-close::after {
  transform: rotate(-45deg);
}

.h5-cart-added-icon {
  width: 6.4rem;
  height: 6.4rem;
  margin: 0 auto 1.6rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff6a66, #ff413d);
  box-shadow: 0 0.8rem 2rem rgba(255, 65, 61, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: h5-cart-added-bounce 0.45s ease;
}

.h5-cart-added-icon svg {
  width: 3rem;
  height: 3rem;
  stroke: #fff;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: h5-cart-added-check 0.45s 0.18s ease forwards;
}

.h5-cart-added-title {
  margin: 0 0 0.6rem;
  color: #111;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 2.6rem;
}

.h5-cart-added-message {
  margin: 0 0 1.8rem;
  color: #777;
  font-size: 1.3rem;
  line-height: 2rem;
}

.h5-cart-added-product {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem;
  margin: 0 0 2rem;
  border-radius: 1.2rem;
  background: #f7f7f8;
  text-align: left;
}

.h5-cart-added-thumb {
  flex: 0 0 6.4rem;
  width: 6.4rem;
  height: 6.4rem;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eee;
}

.h5-cart-added-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.h5-cart-added-copy {
  min-width: 0;
  flex: 1;
}

.h5-cart-added-copy h3 {
  margin: 0 0 0.4rem;
  color: #222;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.h5-cart-added-copy span {
  display: block;
  color: #888;
  font-size: 1.2rem;
  line-height: 1.8rem;
}

.h5-cart-added-actions {
  display: flex;
  gap: 1rem;
}

.h5-cart-added-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 4.4rem;
  padding: 0 1.2rem;
  border: 0;
  border-radius: 999px;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.h5-cart-added-continue {
  background: #f2f3f5;
  color: #323233;
}

.h5-cart-added-cart {
  background: linear-gradient(104deg, #f86864 0%, #ff4d47 100%);
  color: #fff;
}

@keyframes h5-cart-added-pop {
  from { opacity: 0; transform: translateY(1.2rem) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes h5-cart-added-bounce {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes h5-cart-added-check {
  to { stroke-dashoffset: 0; }
}

/* ===== Pretty select ===== */
.pretty-select {
  position: relative;
  width: 100%;
}

.pretty-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  appearance: none !important;
  background: none !important;
}

.pretty-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  width: 100%;
  height: 3.6rem;
  padding: 0 1rem;
  border: 0.1rem solid var(--h5-border);
  border-radius: 0.6rem;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  color: var(--h5-text);
  font-size: 1.3rem;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.pretty-select-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pretty-select.is-placeholder .pretty-select-value {
  color: var(--h5-placeholder);
}

.pretty-select-caret {
  flex: 0 0 auto;
  width: 0.8rem;
  height: 0.8rem;
  border-right: 0.16rem solid #888;
  border-bottom: 0.16rem solid #888;
  transform: rotate(45deg) translateY(-0.15rem);
  transition: transform .18s ease, border-color .18s ease;
}

.pretty-select.is-open .pretty-select-trigger {
  border-color: var(--h5-primary);
  box-shadow: 0 0 0 0.25rem rgba(255, 77, 71, 0.12);
}

.pretty-select.is-open .pretty-select-caret {
  border-color: var(--h5-primary);
  transform: rotate(225deg) translateY(-0.08rem);
}

.pretty-select.is-disabled .pretty-select-trigger {
  background: #f4f4f4;
  color: #999;
  border-color: #e2e2e2;
  cursor: not-allowed;
  box-shadow: none;
}

.pretty-select-panel {
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 0.1rem solid var(--h5-line);
  border-radius: 0.8rem;
  background: #fff;
  box-shadow: 0 1rem 2.4rem rgba(17, 17, 17, 0.14);
}

.pretty-select-panel[hidden] {
  display: none !important;
}

.pretty-select-search {
  padding: 0.8rem 0.8rem 0.6rem;
  border-bottom: 0.1rem solid var(--h5-line);
}

.pretty-select-search-input {
  width: 100%;
  height: 3.2rem;
  padding: 0 1rem;
  border: 0.1rem solid var(--h5-line);
  border-radius: 0.6rem;
  background: #fafafa;
  font-size: 1.2rem;
}

.pretty-select-search-input:focus {
  outline: none;
  border-color: var(--h5-primary);
  background: #fff;
}

.pretty-select-list {
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  overflow: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.pretty-select-option {
  display: flex;
  align-items: center;
  min-height: 3.6rem;
  padding: 0.8rem 1rem;
  border-radius: 0.6rem;
  color: var(--h5-text);
  font-size: 1.3rem;
  line-height: 1.35;
  cursor: pointer;
}

.pretty-select-option span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pretty-select-option:active,
.pretty-select-option.is-active {
  background: #fff5f4;
}

.pretty-select-option.is-selected {
  background: rgba(255, 77, 71, 0.1);
  color: var(--h5-primary);
  font-weight: 700;
}

.pretty-select-option.is-disabled {
  color: #bbb;
  cursor: not-allowed;
}

.pretty-select-empty {
  padding: 1.6rem 1rem;
  color: #999;
  font-size: 1.2rem;
  text-align: center;
}
