@font-face {
    font-family: 'iconfont';  /* Project id 4915613 */
    src: url('//at.alicdn.com/t/c/font_4915613_21lotjp1p2vh.woff2?t=1748187724151') format('woff2'),
         url('//at.alicdn.com/t/c/font_4915613_21lotjp1p2vh.woff?t=1748187724151') format('woff'),
         url('//at.alicdn.com/t/c/font_4915613_21lotjp1p2vh.ttf?t=1748187724151') format('truetype');
  }
  .iconfont{
      font-family:"iconfont" !important;
      font-size:16px;font-style:normal;
      -webkit-font-smoothing: antialiased;
      -webkit-text-stroke-width: 0.2px;
      -moz-osx-font-smoothing: grayscale;}
  #app {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    margin-top: 5px;
  }

  @media (max-width: 768px) {
	html, body {
		width: 100%;
		overflow-x: hidden;
		max-width: 100vw;
		position: relative;
	}
	body {
		width: 100%;
		overflow-x: hidden;
	}
    .main-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100vw;
        overflow-x: hidden;
    }
    .container {
        max-width: 100vw;
        overflow-x: hidden;
    }
    .buy-cars-page {
        max-width: 100vw;
        overflow-x: hidden;
    }
    .buy-cars-page .container {
        max-width: 100vw;
        overflow-x: hidden;
    }
    .car-search-form-container {
        max-width: 100vw;
        overflow-x: hidden;
    }
    .car-search-form-container .container {
        max-width: 100vw;
        overflow-x: hidden;
    }
}

/* 网站头部导航样式 - 使用更高优先级覆盖Bootstrap */
body .navbar.navbar-expand-lg.navbar-light.bg-primary {
    background-color: #6BE5DA !important;
    border-bottom: 2px solid #6BE5DA;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body .navbar .navbar-brand {
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    color: #3551a5 !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

body .navbar .navbar-brand:hover {
    color: #2a4190 !important;
    transform: scale(1.02);
}

body .navbar .navbar-nav .nav-link {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #3551a5 !important;
    padding: 0.75rem 1.2rem !important;
    transition: all 0.3s ease;
    position: relative;
}

body .navbar .navbar-nav .nav-link:hover {
    color: #2a4190 !important;
    background-color: rgba(53, 81, 165, 0.08);
    border-radius: 4px;
    transform: translateY(-1px);
}

body .navbar .navbar-nav .nav-item.active .nav-link {
    background-color: rgba(53, 81, 165, 0.12);
    border-radius: 4px;
    color: #3551a5 !important;
    font-weight: 700 !important;
}

/* 登录/注册按钮样式（未登入時導航列） */
body .navbar .navbar-nav .login-btn {
    background: #6BE5DA !important;
    color: #3551a5 !important;
    border-radius: 20px;
    padding: 0.6rem 1.2rem !important;
    margin-left: 15px;
    transition: all 0.3s ease;
    border: 2px solid #3551a5;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(53, 81, 165, 0.2);
}

body .navbar .navbar-nav .login-btn:hover {
    background: #5ACFC9 !important;
    border-color: #3551a5;
    color: #2a4190 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(53, 81, 165, 0.28);
    text-decoration: none;
}

/* 已登录状态样式 */
body .navbar .navbar-nav .user-status {
    color: #3551a5 !important;
    font-weight: 600;
    padding: 0.6rem 0.8rem !important;
    margin-left: 15px;
    background-color: transparent;
    border-radius: 20px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

body .navbar .navbar-toggler {
    border: 2px solid #3551a5;
    padding: 0.45rem 0.85rem;
}

body .navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(53, 81, 165, 0.35);
}

body .navbar .navbar-toggler .navbar-toggler-icon {
    display: none;
}

body .navbar .navbar-toggler .navbar-toggler-label {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #3551a5;
    line-height: 1.2;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body .navbar .navbar-brand {
        font-size: 1.4rem !important;
    }
    
    body .navbar .navbar-nav .nav-link {
        font-size: 0.9rem !important;
        padding: 0.5rem 1rem !important;
    }
    
    body .navbar .navbar-nav .login-btn {
        margin-left: 0;
        margin-top: 8px;
        text-align: center;
        width: 100%;
        max-width: 120px;
    }
    
    body .navbar .navbar-nav .user-status {
        margin-left: 0;
        margin-top: 8px;
        text-align: center;
        width: 100%;
        max-width: 120px;
    }
}

/* 购物车悬浮按钮样式 */
.cart-float-btn {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-float-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

.cart-icon {
    background: linear-gradient(135deg, #5ACFC9 0%, #4AB8B2 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(90, 207, 201, 0.4);
    font-size: 1.5rem;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* 购物车模态框样式 */
.cart-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 8px;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h6 {
    margin: 0 0 5px 0;
    font-weight: 600;
}

.cart-item-price {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-quantity span {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.cart-item-total {
    font-weight: 600;
    color: #5ACFC9;
    min-width: 80px;
    text-align: right;
}

.cart-empty {
    text-align: center;
    padding: 40px;
    color: #666;
}

.cart-empty i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 15px;
}

.cart-total {
    font-size: 1.1rem;
    font-weight: 600;
    color: #5ACFC9;
}

/* Toast通知样式 */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #5ACFC9;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式购物车按钮 */
@media (max-width: 768px) {
    .cart-float-btn {
        right: 15px;
    }
    
    .cart-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .cart-count {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
}

/* 通用页脚样式 */
.footer {
    background-color: #2a2a2a;
    color: #e0e0e0;
    padding: 50px 0 30px;
    margin-top: 50px;
}

.footer-column {
    margin-bottom: 30px;
}

.footer-title {
    color: #6BE5DA;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #E9EBED;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #6BE5DA;
    text-decoration: none;
}

.footer-links span {
    color: #E9EBED;
    font-size: 0.95rem;
    display: inline-block;
    opacity: 0.6;
    cursor: default;
}

.footer-line-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.line-button {
    display: inline-block;
    background-color: #6BE5DA;
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.line-button:hover {
    background-color: #5ACFC9;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(107, 229, 218, 0.3);
}

/* 页脚响应式设计 */
@media (max-width: 768px) {
    .footer {
        padding: 30px 0 20px;
        margin-top: 30px;
    }
    
    .footer-column {
        margin-bottom: 25px;
    }
    
    .footer-title {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    /* 手机版：footer-links改为一行两个 */
    .footer-links {
        display: flex;
        flex-wrap: wrap;
        gap: 10px 15px;
    }
    
    .footer-links li {
        margin-bottom: 0;
        flex: 0 0 calc(50% - 7.5px);
        min-width: 0;
    }
    
    .footer-links a {
        font-size: 0.9rem;
        width: 100%;
    }
    
    .line-button {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    /* 手机版：Line按钮左右排列在一行 */
    .footer-line-buttons {
        flex-direction: row !important;
        gap: 10px;
    }
    
    .footer-line-buttons .line-button {
        flex: 1;
        min-width: 0;
    }
}

/* 从 main.ftl 移动过来的样式 */

/* 購物車懸浮按鈕樣式 */
.cart-float-btn {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-float-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

.cart-icon {
    background: linear-gradient(135deg, #5ACFC9 0%, #4AB8B2 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(90, 207, 201, 0.3);
    position: relative;
    font-size: 1.5rem;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    border: 2px solid white;
}

/* Toast通知样式 */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #5ACFC9;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 已登錄狀態樣式 */
.user-status {
    background: transparent;
    color: white !important;
    border-radius: 25px;
    padding: 0.6rem 0.8rem !important;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-status:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f8f9fa !important;
    transform: translateY(-1px);
}

.user-status i {
    font-size: 1.3rem;
}

/* 登錄按鈕樣式（通用，與導航欄底色呼應） */
.login-btn {
    background: #6BE5DA !important;
    color: #3551a5 !important;
    border-radius: 20px;
    padding: 8px 16px !important;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid #3551a5;
    box-shadow: 0 2px 8px rgba(53, 81, 165, 0.2);
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: #5ACFC9 !important;
    border-color: #3551a5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(53, 81, 165, 0.28);
    color: #2a4190 !important;
}

/* 下拉菜單樣式 */
.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
}

.dropdown-item {
    padding: 10px 16px;
    color: #333;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #5ACFC9;
}

.dropdown-item i {
    color: #6c757d;
}

body .navbar .navbar-nav .dropdown-item i {
    color: #3551a5;
}

/* 導航欄下拉菜單樣式 */
.navbar-nav .nav-item.dropdown {
    position: relative;
}

.navbar-nav .dropdown-menu {
    background-color: #6BE5DA;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 0;
    padding: 8px 0;
    min-width: 180px;
    top: 100%;
    left: 0;
    display: none;
    position: absolute;
    z-index: 1000;
    /* 使用padding-top创建不可见的连接区域，减少间隙 */
    padding-top: 4px;
    /* 覆盖Bootstrap的CSS变量 */
    --bs-dropdown-link-hover-bg: transparent;
    --bs-dropdown-link-active-bg: transparent;
}

/* 确保Bootstrap的show类能显示下拉菜单 */
.navbar-nav .dropdown-menu.show {
    display: block !important;
}

.navbar-nav .nav-item.dropdown.show .dropdown-menu {
    display: block !important;
}

/* 创建一个不可见的连接区域，连接父菜单和子菜单，避免鼠标移出时菜单消失 */
.navbar-nav .nav-item.dropdown .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: transparent;
    z-index: 1;
}

.navbar-nav .dropdown-item {
    padding: 10px 20px;
    color: #3551a5;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    background-color: transparent !important;
    background: transparent !important;
}

body .navbar-nav .dropdown-item:hover,
body .navbar-nav .dropdown-item:focus,
body .navbar-nav .dropdown-item:active,
body .navbar-nav .dropdown-item:hover:focus,
body .navbar-nav .dropdown-item:hover:active,
body .navbar .navbar-nav .dropdown-item:hover,
body .navbar .navbar-nav .dropdown-item:focus,
body .navbar .navbar-nav .dropdown-item:active {
    color: #2a4190 !important;
    background-color: transparent !important;
    background: transparent !important;
    background-image: none !important;
    transform: translateX(4px);
}

.navbar-nav .dropdown-toggle::after {
    margin-left: 6px;
    vertical-align: 0.15em;
    border-top: 0.4em solid;
    border-right: 0.4em solid transparent;
    border-bottom: 0;
    border-left: 0.4em solid transparent;
}

/* 確保下拉菜單在懸停時顯示，包括父菜单和子菜单区域 */
@media (min-width: 992px) {
    .navbar-nav .nav-item.dropdown:hover .dropdown-menu {
        display: block !important;
        animation: fadeInDown 0.3s ease;
    }
    
    /* 当鼠标悬停在父菜单或子菜单上时，保持子菜单显示 */
    .navbar-nav .nav-item.dropdown .dropdown-menu:hover {
        display: block !important;
    }
}

/* 手机版下拉菜单样式 */
@media (max-width: 991.98px) {
    .navbar-nav .nav-item.dropdown .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin-top: 0;
        background-color: rgba(255, 255, 255, 0.1);
        border: none;
        box-shadow: none;
        padding: 0;
        display: none !important;
    }
    
    .navbar-nav .nav-item.dropdown .dropdown-item {
        padding: 10px 20px 10px 40px;
        color: #3551a5 !important;
        border-top: 1px solid rgba(53, 81, 165, 0.12);
    }
    
    .navbar-nav .nav-item.dropdown .dropdown-item:hover,
    .navbar-nav .nav-item.dropdown .dropdown-item:focus {
        background-color: rgba(53, 81, 165, 0.08) !important;
        color: #2a4190 !important;
    }
    
    /* 确保点击后显示下拉菜单 - 使用更高优先级 */
    .navbar-nav .nav-item.dropdown.show .dropdown-menu,
    .navbar-nav .nav-item.dropdown .dropdown-menu.show {
        display: block !important;
    }
    
    /* 确保父元素有show类时显示 */
    .navbar-nav .nav-item.dropdown.show > .dropdown-menu {
        display: block !important;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 導航欄品牌文字樣式 */
body .navbar .navbar-brand .brand-text {
    display: flex;
    flex-direction: row;
    align-items: center;
    color: #3551a5 !important;
    text-decoration: none;
}

.brand-main {
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 8px;
    white-space: nowrap;
}

.brand-sub {
    font-size: 0.9rem;
    font-weight: normal;
    opacity: 0.9;
    white-space: nowrap;
}

/* 導航欄字體樣式 */
body .navbar .navbar-nav .nav-link {
    color: #3551a5 !important;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #2a4190 !important;
    transform: translateY(-1px);
}

body .navbar .navbar-nav .nav-item.active .nav-link {
    color: #3551a5 !important;
    font-weight: 700;
}

/* 響應式設計 */
@media (max-width: 768px) {
    body .navbar .navbar-brand .brand-text {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .brand-main {
        font-size: 1.2rem;
        margin-right: 0 !important;
        margin-bottom: 2px;
        width: 100%;
        display: block;
    }
    
    .brand-sub {
        display: block !important;
        font-size: 0.75rem;
        margin-top: 0;
        margin-left: 0 !important;
        line-height: 1.2;
        width: 100%;
        white-space: normal;
    }
    
    .cart-float-btn {
        right: 20px;
        top: auto;
        bottom: 30px;
        transform: none;
    }
    
    .cart-float-btn:hover {
        transform: scale(1.1);
    }
    
    .cart-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .cart-count {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .user-status,
    .login-btn {
        padding: 8px 16px !important;
        font-size: 0.85rem;
    }
    
    .user-status i {
        font-size: 1rem;
    }
}