﻿/* ---------- Google Fonts ---------- */
@import url('/pcshop/css/Interfontscss2.css');

/* ---------- CSS 变量 ---------- */
:root {
    --color-primary: #1E40AF;
    --color-primary-dark: #1E3A8A;
    --color-secondary: #059669;
    --color-accent: #10B981;
    --color-dark: #1F2937;
    --color-light: #F9FAFB;
}

/* ---------- 基础重置 ---------- */
html, body {
    font-family: 'Poppins';
    scroll-behavior: smooth;
    overflow-x: hidden;
}

[v-cloak] {
    display: none !important;
}

/* ---------- 通用动画 ---------- */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes slideUp {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1 !important;
    }
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out both;
}

.animate-slide-up {
    animation: slideUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* ---------- 高性能滚动入场动画 ---------- */
.scroll-reveal {
    opacity: 0;
    will-change: opacity, transform;
    /* 采用 cubic-bezier 让动画有呼吸感，更丝滑 */
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 定义不同方向的初始状态 (使用 translate3d 开启 GPU 加速防卡顿) */
.reveal-up {
    transform: translate3d(0, 50px, 0);
}

.reveal-left {
    transform: translate3d(-50px, 0, 0);
}

.reveal-right {
    transform: translate3d(50px, 0, 0);
}

.reveal-scale {
    transform: scale3d(0.95, 0.95, 1);
}

/* 触发后的状态 */
.scroll-reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
}

/* 车辆分页切换时极为短暂的淡入，不产生位移，防止生硬 */
.fade-quick-enter-active {
    transition: opacity 0.3s ease;
}

.fade-quick-enter, .fade-quick-leave-to {
    opacity: 0;
}

/* ---------- 毛玻璃效果 ---------- */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ---------- 文字阴影 ---------- */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ---------- 统一过渡 ---------- */
.transition-all-300 {
    transition: all 0.3s ease;
}

.transition-textarea-300 {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter;
    transition-duration: 300ms;
}

/* ---------- 卡片悬停效果 ---------- */
.card-hover {
    transition: all 0.3s ease;
}

    .card-hover:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    }

/* ---------- 骨架屏加载 ---------- */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

/* ---------- 导航栏滚动效果 ---------- */
.navbar {
    transition: background-color 0.3s ease;
}

    .navbar.scrolled {
        background-color: rgba(255, 255, 255, 0.95);
        box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    }

/* ---------- 首页 Hero 区域 ---------- */
.hero-section {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://p26-doubao-search-sign.byteimg.com/labis/cea6d4c0848a993a4d66ee04e9586dd3~tplv-be4g95zd3a-image.jpeg?lk3s=feb11e32&x-expires=1790573872&x-signature=ZDJTvyoKmDUzcWl0gAejvjQPCxM%3D');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* ---------- 主按钮 ---------- */
.btn-primary {
    background-color: var(--color-primary);
    transition: background-color 0.3s ease;
}

    .btn-primary:hover {
        background-color: #1E3A8A;
    }

.btn-secondary {
    background-color: var(--color-secondary);
    transition: background-color 0.3s ease;
}

    .btn-secondary:hover {
        background-color: #047857;
    }

/* ---------- 首页车辆分类按钮激活态 ---------- */
.category-btn.active {
    background-color: var(--color-primary-dark);
    color: white;
}

/* ---------- 位置/车辆卡片悬停 ---------- */
.location-card,
.car-card,
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .location-card:hover,
    .car-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    }

    .testimonial-card:hover {
        transform: scale(1.02);
    }

/* ---------- 数字计数器 ---------- */
.counter {
    font-variant-numeric: tabular-nums;
}

/* ---------- 隐藏滚动条 ---------- */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ---------- 输入框点击边框颜色问题 ---------- */
input:focus, textarea:focus, select:focus {
    outline: none !important;
}

/* ---------- Checkbox 样式 ---------- */
input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #D1D5DB; /* border-gray-300 */
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

    input[type="checkbox"]:checked {
        background-color: var(--color-primary);
        border-color: var(--color-primary);
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
        background-size: 100% 100%;
        background-position: center;
        background-repeat: no-repeat;
    }

    input[type="checkbox"]:focus {
        outline: none;
    }

    /* 验证失败时的红色边框 */
    input[type="checkbox"].border-red-500 {
        border-color: #EF4444;
    }

input[type="radio"] {
    accent-color: var(--color-primary);
}

/* ---------- 骨架屏动画 ----------*/
@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

/* ---------- 确保主图区域的平滑过渡 ---------- */
#main-image {
    will-change: opacity;
}

/* ---------- 评论区星星交互 ---------- */
#star-container {
    position: relative;
    display: inline-flex;
}

#star-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    white-space: nowrap; /* 保证星星不换行 */
    transition: width 0.1s ease-out; /* 丝滑跟随 */
}

.text-1xl {
    font-size: 1.25rem !important;
    line-height: 1.5rem !important;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

input, select, textarea {
    /*transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: box-shadow, border-color;*/
    -webkit-tap-highlight-color: transparent;
}

    input[type="date"],
    input[type="datetime-local"] {
        line-height: 1.4;
    }

        input[type="datetime-local"]::-webkit-clear-button {
            display: none;
        }

        input[type="datetime-local"]::-webkit-calendar-picker-indicator {
            cursor: pointer;
            opacity: 0.6;
            transition: opacity 0.2s ease;
        }

            input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
                opacity: 1;
            }

select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em 1.2em;
    padding-right: 2.5rem !important;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    margin-right: 0;
}

    input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
        opacity: 1;
    }

select::-ms-expand {
    display: none;
}

.input-wrap:focus-within {
    box-shadow: 0 0 0 2px var(--color-primary);
    border-color: transparent !important;
}

.input-wrap.border-red-500 {
    border-color: #EF4444 !important;
}

    .input-wrap.border-red-500:focus-within {
        box-shadow: 0 0 0 2px rgb(239 68 68 / var(--tw-ring-opacity, 1)) !important;
        border-color: transparent !important;
    }

/* Select组件 */
.dropdown-fade-enter-active, .dropdown-fade-leave-active {
    transition: opacity 0.1s ease, transform 0.1s ease;
    transform-origin: top;
}

.dropdown-fade-enter, .dropdown-fade-leave-to {
    opacity: 0;
    transform: translateY(-10px) scaleY(0.95);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #D1D5DB;
    border-radius: 20px;
}

    .custom-scrollbar::-webkit-scrollbar-thumb:hover {
        background-color: #9CA3AF;
    }
