/* 颜色变量 */
:root {
  --primary-color: #FECA3C;
  --green-color: #42D478;
  --red-color: #FF0000;
  --blue-color: #007ADE;
  --purple-color: #5F89FF;
  --tag-bg: #F7F2E7;
  --tag-text: #D98C00;
  --param-bg: #F5F5F5;
  --text-black: #000000;
  --text-gray: #666666;
  --text-light: #999999;
}


/* Back to Top button */
.backTop {
    position: fixed;
    right: 6.25rem;
    bottom: 6.25rem;
    width: 4rem;
    height: 4rem;
    border-radius: 2rem;
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.backTop::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 0.375rem solid transparent;
    border-right: 0.375rem solid transparent;
    border-bottom: 0.625rem solid #000;
    /* white upward triangle */
}

.backTop.backTop--visible {
    opacity: 1;
    pointer-events: auto;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    z-index: 100001;
    font-size: 0.875rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.toast-container.show {
    opacity: 1;
}

html,
body {
    margin: 0;
    padding: 0;
    font-size: 0.83328vw;
    color: #000;
    font-family: 'MiSans', sans-serif;
}

.form-control:focus,
.form-check-input:focus,
.form-select:focus {
    border-color: #000 !important;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075) !important;
}
ul,
li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.line-clamp {
    display: -webkit-box;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
}


.line-clamp-2 {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
}

.line-clamp-4 {
    display: -webkit-box;
    line-clamp: 4;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
}

.bg-f5 {
    background: #f5f5f5;
}

.container {
    max-width: 76.05%;
    padding: 0;
    width: 100%;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}
.main-container{
    min-height: 100vh;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: #000;
}

button,input {
    outline: none !important;
    border: none;
    transition: opacity 0.3s;
}
button:hover{
    opacity: 0.85;
}


.navbar-toggler:focus {
    border: none !important
}

.lighter {
    font-weight: lighter;
}

.base_bg {
    background: #e9f3ff;
}

/*固定图片比例*/
.fixed-ratio {
    display: block;
    position: relative;
    width: 100%;
    overflow: hidden;
}

/*默认3:2*/
.fixed-ratio::before {
    content: "\0020";
    display: block;
    width: 100%;
    height: 0;
    padding: 33.33% 0;
}

/*比例4:2.5*/
.fixed-ratio.rectangle::before {
    content: "\0020";
    display: block;
    width: 100%;
    height: 0;
    padding: 31.25% 0;
}

/*比列1:2*/
.fixed-ratio.halfv::before {
    padding: 75% 0;
}

/*比列2:1*/
.fixed-ratio.half::before {
    padding: 25% 0;
}

/*比列1:1*/
.fixed-ratio.square::before {
    padding: 50% 0;
}

/*比列3:4*/
.fixed-ratio.frectangle::before {
    padding: 66.66% 0;
}

.fixed-ratio>img,
.fixed-ratio>div {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.fixed-ratio>img,
.fixed-ratio>img {
    object-fit: cover;
}
/*common end*/

header {
    background: white;
    position: fixed;
    width: 100%;
    z-index: 99999;
    top: 0;
    left: 0;
    padding: 0.875rem 3%;
}
header .logo-language {
    flex-shrink: 0;
}

header .logo {
    font-size: 1.25rem;
    font-weight: bold;
}
header .language-switch {
    cursor: pointer;
}

header .language-text {
    font-size: 0.75rem;
}

header .arrow-icon {
    width: 1.5rem;
    height: 1.5rem;
}

header .language-switch {
    position: relative;
    cursor: pointer;
}

header .language-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.625rem rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    min-width: 7.5rem;
}

header .language-dropdown.show {
    display: block;
}

header .language-option {
    padding: 0.625rem 0.9375rem;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.75rem;
    display: block;
}

header .language-option:hover {
    background-color: #f5f5f5;
}

header .search-container {
    flex: 1;
    max-width: 30vw;
    border: 2px solid var(--primary-color);
    margin: 0;
}
header .search-input {
    flex: 1;
    padding: 0 1rem;
    font-size: 0.875rem;
}

header .search-button {
    background: var(--primary-color);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    flex-shrink: 0;
}
.navigation a:hover,.navigation a.active,.mobile-nav a.active{
    color: var(--primary-color);
}
header .login-button {
    background: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    flex-shrink: 0;
}
header .userInfo{
    display: flex;
}
header .userInfo .user-avatar{
    width: 2.625rem;
    border-radius: 50%;
    overflow: hidden;
}
header .userInfo .user-name {
    font-size: 1rem;
}
header .userInfo .user-role {
    font-size: 0.75rem;
    color: var(--purple-color);
    border: 1px solid var(--purple-color);
    border-radius: 3rem;
    padding: 0 0.5rem;
}
header .mobile-menu .search-btn{
    width: 2rem;
}
header .mobile-menu-btn {
    width: 2rem;
    height: 2rem;
    gap: 0.375rem;
    cursor: pointer;
    flex-shrink: 0;
}

header .mobile-menu-btn span {
    width: 1.5rem;
    height: 0.125rem;
    background-color: var(--text-black);
    transition: all 0.3s;
    position: relative;
}

header .mobile-menu-btn span.hamburger-line {
    width: 1.5rem;
    height: 0.125rem;
    background-color: var(--text-black);
    display: block;
    transition: all 0.3s;
    position: relative;
}

header .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(0.3125rem, 0.3125rem);
    background-color: var(--text-black);
}

header .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

header .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(0.4375rem, -0.4375rem);
    background-color: var(--text-black);
}

.mobile-nav {
    position: fixed;
    right: -100%;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    transition: all 0.5s;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-item {
    display: block;
    padding: 0.9375rem 0;
    font-size: 1rem;
    color: var(--text-black);
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-item:hover {
    color: var(--primary-color);
}
.mobile-nav-container {
    width: 80%;
    background: white;
    padding: 1rem;
}

/* 移动端搜索覆盖层 */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
}

.mobile-search-overlay.active {
    display: flex;
}

.mobile-search-container {
    position: relative;
    width: 90%;
    border-radius: 0.5rem;
    padding: 1rem;
    background: white;
}
.mobile-search-container .form {
    border: 2px solid var(--primary-color);
}

.search-title {
    font-size: 1.5rem;
}
/*header end*/

/*mob bottom nav begin*/
.mobile-bottom-nav {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background: white;
    padding:0.5rem 1rem;
    /* padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom); */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 99999;
}
.mobile-bottom-nav .sidebar-item{
    gap: 0;
    padding: 0.5rem;
}
.mobile-bottom-nav .sidebar-text {
    font-size: 0.625rem;
}
/*mob bottom nav end*/


/*sidebar begin*/
.sidebar {
    width: 15.625rem;
    background: white;
    position: relative;
}
.sidebar-menu {
    position: sticky;
    left: 0;
    top: 5rem;
    padding: 2rem 1rem;
}
.sidebar-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    border-radius: 0.25rem;
    width: 100%;
}

.sidebar-item:hover {
    background: #FFF8E6;
}

.sidebar-item.active {
    background: var(--primary-color);
}
.sidebar-icon {
    width: 1.25rem;
    flex-shrink: 0;
}
.sidebar-text {
    font-size: 0.875rem;
}
.sidebar-title {
    padding: 1.25rem 0px 0px;
    font-size: 0.875rem;
    border-top: 1px solid #DDDDDD;
    color: #BCBCBC;
}
/*sidebar end*/

.content-area {
    flex: 1;
    padding: 2rem;
    background: #F5F5F5;
    word-wrap: break-word;
    word-break: break-all;
}


/* 登录弹窗样式 */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
}

body.modal-open {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 100000;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 28.5rem;
    margin: 3rem auto;
    position: relative;
    
}
.modal-content.center {
    top: 40%;
    transform: translateY(-50%);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.close-btn {
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
}

.login-submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.login-submit-btn:hover {
    opacity: 0.9;
}

.login-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.login-footer a {
    font-size: 0.875rem;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

.third-party-login {
    margin-top: 1.5rem;
    text-align: center;
}

.divider {
    position: relative;
    height: 1px;
    background: #eee;
    margin: 1.5rem 0 0.5rem;
    text-align: center;
    line-height: 1rem;
}

.divider::before {
    content: attr(data-text);
    position: relative;
    top: -0.5rem;
    padding: 0 0.5rem;
    background: white;
    color: #999;
    font-size: 0.875rem;
}

.social-btn {
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    background: none;
}


.social-btn img {
    width: 2rem;
    height: 2rem;
}
.login-agreement{
    font-size: 0.75rem;
    color: #666;
    text-align: center;
}
.login-agreement a:hover{
    text-decoration: underline;
}
.reg-code-btn{
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
    background: #ddd;
    color: #000;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}
.reg-code-btn:hover{
    background: #ddd;
}
.login-modal .modal-content,.forgot-modal .modal-content,.register-modal .modal-content {
  top: 40%;
  transform: translateY(-50%);
}

/*pagination begin*/
.pagination-dot {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #333;
  font-size: 0.875rem;
  cursor: pointer;
}

.pagination-dot:hover {
  background: #FECA3C;
}

.pagination-dot.active {
  background: #FECA3C;
}

/*pagination end*/


/*breadcrumb begin*/
.breadcrumb {
    margin: 0;
}

.breadcrumb ul,
.breadcrumb li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    font-size: 0.875rem;
    display: flex;
    text-transform: capitalize;
    color: #666;
}

.breadcrumb li a {
    color: #666;
}

.breadcrumb li+li::before {
    content: ">";
    display: inline-block;
    margin: 0 .5rem;
    color: #888
}
/*breadcrumb end*/

/*公共标题 begin*/
.base_pub_title {
    font-size: 1.25rem;
    border-bottom: 1px solid #DDDDDD;
}
.base_pub_title span{
    position: relative;
    padding-left: 1rem;
}
.base_pub_title span::before {
    content: "";
    position: absolute;
    width: 4px;
    border-radius: 2px;
    height: 80%;
    background: var(--primary-color);
    left: 0;
    top: 10%;
}
/*公共标题 end*/

/*车辆列表 begin */
.car-items-container{
    transition: all 0.5s;
}
.car-list .sort-bar {
  padding: 1rem 1.25rem;
  background: #FFFFFF;
  border-bottom: 1px solid #DDDDDD;
}

.car-list .sort-item {
  font-size: 0.875rem;
  color: #999;
  cursor: pointer;
  transition: color 0.2s;
}
.car-list .sort-item.active {
  color: #000000;
}

.car-list .layout-icon {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.2s;
}

.car-list .layout-icon.active {
  opacity: 1;
}

.car-list .sort-item svg path {
  transition: fill 0.2s;
}

.car-list .sort-item svg path.active {
  fill: #000000;
}

.car-items-container .car-card {
  padding: 1.875rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  border-bottom: 1px solid #DDDDDD;
  background: #fff;
}

.car-items-container .car-image-box {
  width: 18.75rem;
  position: relative;
  border-radius: 0.375rem;
  overflow: hidden;
  flex-shrink: 0;
}
.car-items-container .car-image-box a{
  display: block;
  width: 100%;
}
.car-items-container .car-image-box a img{
  transition: all 0.3s;
}
.car-items-container .car-image-box a:hover img{
  transform: scale(1.1);
}

.car-items-container .car-id-tag {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  background: rgba(0, 0, 0, 0.5);
  color: #FFFFFF;
  font-size: 0.625rem;
  padding: 0.3125rem 0.625rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.2s;
}

.car-items-container .car-id-tag:hover {
  background: rgba(0, 0, 0, 0.7);
}

.car-items-container .car-info-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0; /* 防止溢出 */
}

.car-items-container .car-title-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.car-items-container .car-title-text {
  font-size: 1.25rem;
  color: #000000;
}
.car-items-container .car-title-text a:hover{
  text-decoration: underline;
}
.car-items-container .badge-new {
  background: #42D478;
  color: #FFFFFF;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  white-space: nowrap;
}

.car-items-container .car-price-box {
  width: 12rem;
  text-align: center;
  flex-shrink: 0;
}

.car-items-container .car-price-text {
  font-size: 1.125rem;
  color: #FF0000;
}

.car-items-container .car-favorite-box {
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.car-items-container .star-icon {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}


.car-items-container .car-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.car-items-container .car-ui-tag {
  background: #F7F2E7;
  color: #D98C00;
  font-size: 0.75rem;
  padding: 0.3125rem 0.625rem;
  border-radius: 0.25rem;
}

.car-items-container .car-specs-row {
  font-size: 0.875rem;
  color: #333333;
}

.car-items-container .spec-divider {
  color: #999999;
  margin: 0 0.625rem;
}
.list_s{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem 1rem;
  padding: 1.25rem;
}

.list_s .car-card{
  flex-direction: column;
  gap: 0.625rem;
  padding: 0;
  border: none;
  position: relative;
}
.list_s .car-info-content{
  gap: 0.625rem;
}
.list_s .car-info-box{
  flex-direction: column;
}
.list_s .car-price-box{
  text-align: left;
}
.list_s .car-specs-row{
  line-clamp: 2;
  -webkit-line-clamp: 2;
}
.list_s .car-image-box{
  width: 100%;
  position: relative;
}
.list_s .car-image-box .car-popularity{
    position: absolute;
    left: 0;
    top: 0;
    padding: 0.25rem 1rem;
    border-radius: 0 0 0.25rem 0;
    background: var(--green-color);
    color: white;
}
.list_s .car-favorite-box{
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.5rem;
  border-radius:0 0.375rem 0 0.375rem;
}
/*车辆列表 end*/

/* My Purchase */
.editPurchase{
  font-size: 0.875rem;
  color: white;
  text-decoration: none;
  background: var(--purple-color);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  cursor: pointer;
  transition: all 0.3s;
}
.editPurchase .icon{
  width: 1.5rem;
}
.backPurchase{
  font-size: 0.875rem;
  color: #666;
  text-decoration: none;
  border: 1px solid #ddd;
  background: none;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  cursor: pointer;
  transition: all 0.3s;
}


@media (max-width: 1500px) {
    html,
    body {
        font-size: 16px;
    }
    .container {
        width: 100%;
        max-width: 100%;
    }
    header .search-button,header .login-button{
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    header .navigation .nav-item{
        font-size: 0.875rem;
    }

}


@media (max-width: 1200px) {
    .sidebar{
        position: fixed;
        left: -100%;
        top: 0;
        height: 100%;
        z-index: 9999;
        transition: left 0.3s ease-in-out;
    }
    .sidebar.expanded {
        left: 0;
    }
    .sidebar-menu{
        padding: 0 1rem;
    }
    .mobile-bottom-nav .sidebar-item:hover{
        background: none;
    }
    .content-area{
        padding: 1rem 1rem 12vh;
        width: 100%;
        max-width: 100%;
    }

    .car-items-container .car-price-box {
      width: 8rem;
    }
}

@media (max-width: 768px) {
    .breadcrumb {
        padding: 0 1rem;
    }
    .breadcrumb li,.breadcrumb li a {
        font-size: 0.75rem;
    }
    .grid-container {
        gap: 0.625rem;
    }
    .mobile-nav-container{
        padding-top: 3.75rem;
    }
    .backTop {
        width: 2rem;
        height: 2rem;
        right: 1rem;
    }
    .base_pub_title {
        font-size: 1rem;
        font-weight: 500;
    }

    /** 车辆列表样式 begin*/
  .mobile-layout-control{
    position: fixed;
    right: 2rem;
    bottom: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    padding: 0.625rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  }
  .car-list{
    padding-top: 2rem;
  }
  .car-items-container .car-card{
    padding: 1rem;
    gap: 0.5rem;
    position: relative;
  }
  .list_s{
    padding: 1rem;
    grid-template-columns: repeat(2, 1fr);
  }
  .list_s .car-card{
    padding: 0;
  }
  .car-items-container .car-info-content{
    gap: 0.625rem;
  }
  .car-items-container .car-specs-row{
    font-size: 0.75rem;
  }
  .car-items-container .car-image-box {
    width: 11rem;
  }
  .car-items-container.list_s .car-image-box {
    width: 100%;
  }
  .car-items-container .car-tags-row {
    display: none;
  }
  .car-items-container .car-id-tag{
    left: 0;
    bottom: 0;
    width: 100%;
  }
  .car-items-container .car-title-text {
    font-size: 1rem;
  }
  .car-items-container .car-price-box {
    text-align: left;
    width: 100%;
  }
  .car-items-container .car-price-text {
    font-size: 1rem;
  }
  .car-items-container .car-info-box{
    flex-direction: column;
  }
  .car-items-container .car-favorite-box{
    display: none;
  }

  /** 车辆列表样式 end*/
}