/* ============================================================
   common.css — 马自达EZ-60试驾预约H5页面公共样式
   适用于全站各页面，按模块注释分区
   ============================================================ */

/* ====== 全局重置 ====== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #0a1628;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ====== 顶部轮播图 ====== */
.carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.carousel-inner {
    display: flex;
    transition: transform 0.45s cubic-bezier(.25,.1,.25,1);
}
.carousel-item {
    min-width: 100%;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    max-height: 560px;
}
.carousel-item svg {
    width: 100%;
    height: 100%;
    display: block;
}
.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.carousel-overlay {
    position: absolute; top:0; left:0; right:0; bottom:0;
    background: linear-gradient(180deg,
        rgba(10,22,40,.15) 0%,
        rgba(10,22,40,0) 30%,
        rgba(10,22,40,.85) 100%);
    pointer-events: none; z-index: 2;
}

/* 轮播指示器 */
.carousel-dots {
    position: absolute;
    bottom: 14px;
    left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 5;
}
.dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,.35);
    transition: all .3s;
    cursor: pointer;
}
.dot.active {
    width: 22px;
    border-radius: 4px;
    background: #d4a017;
}

/* 轮播箭头（PC端悬停显示） */
.carousel-arrow {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px;
    background: rgba(0,0,0,.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all .25s;
    opacity: 0;
    user-select: none;
}
.carousel:hover .carousel-arrow { opacity: 1; }
.carousel-arrow:hover { background: rgba(0,0,0,.4); }
.carousel-arrow.prev { left: 16px; }
.carousel-arrow.next { right: 16px; }
.carousel-arrow:active { transform: translateY(-50%) scale(.9); }

/* ====== 轮播响应式断点 ====== */
@media (max-width: 480px) {
    .carousel-item {
        aspect-ratio: auto;
        height: 220px;
        max-height: none;
    }
    .carousel-arrow { display: none; }
    .carousel-dots { bottom: 10px; gap: 6px; }
    .dot { width: 6px; height: 6px; }
    .dot.active { width: 18px; }
}

@media (min-width: 481px) and (max-width: 767px) {
    .carousel-item {
        aspect-ratio: auto;
        height: 300px;
        max-height: none;
    }
    .carousel-arrow { display: none; }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .carousel-item {
        aspect-ratio: auto;
        height: 400px;
        max-height: none;
    }
}

@media (min-width: 1024px) {
    .carousel-item {
        height: 520px;
        max-height: 520px;
        aspect-ratio: auto;
    }
    .carousel-dots { bottom: 22px; gap: 12px; }
    .dot { width: 10px; height: 10px; }
    .dot.active { width: 28px; border-radius: 5px; }
    .carousel-arrow { width: 48px; height: 48px; font-size: 22px; }
    .carousel-arrow.prev { left: 24px; }
    .carousel-arrow.next { right: 24px; }
}

@media (min-width: 1440px) {
    .carousel-item {
        height: 600px;
        max-height: 600px;
    }
}

/* ====== 表单区域 ====== */
.form-section {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: -30px auto 30px;
    padding: 28px 20px 36px;
    background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.1);
    z-index: 10;
}
.form-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #ffd700, #ff9500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}
.form-row {
    margin-bottom: 16px;
}
.form-label {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,.7);
    margin-bottom: 6px;
    font-weight: 500;
    letter-spacing: 1px;
}
.form-label .required { color: #e74c3c; margin-left: 2px; }

/* 输入框统一样式 */
.form-input, .form-select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: all .25s ease;
    -webkit-appearance: none;
}
.form-input::placeholder { color: rgba(255,255,255,.35); }
.form-input:focus, .form-select:focus {
    border-color: #d4a017;
    background: rgba(212,160,23,.08);
    box-shadow: 0 0 0 3px rgba(212,160,23,.15);
}
.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,.5)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 34px;
}
.form-select option { background: #1a2744; color: #fff; }

/* 省市区三列 / 车型两列 共用 */
.area-group, .car-group {
    display: flex; gap: 8px;
}
.area-group select, .car-group select {
    flex: 1;
    min-width: 0;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    height: 52px;
    margin-top: 8px;
    background: linear-gradient(135deg, #d4a017, #f0c040, #d4a017);
    background-size: 200% 200%;
    animation: shimmer 3s ease infinite;
    border: none;
    border-radius: 26px;
    color: #1a1a2e;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 6px;
    cursor: pointer;
    transition: transform .2s, box-shadow .3s;
    position: relative;
    overflow: hidden;
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(212,160,23,.35); }
.submit-btn:active { transform: scale(.98); }
.submit-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
@keyframes shimmer {
    0%,100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* loading 动画 */
.loading-dot {
    display: inline-block; width: 8px; height: 8px;
    background: #d4a017; border-radius: 50%;
    animation: bounce .6s infinite alternate;
    margin: 0 2px;
}
.loading-dot:nth-child(2) { animation-delay: .15s; }
.loading-dot:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { to { transform: translateY(-6px); } }

/* ====== 政策图片区 ====== */
.policy-section {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 0 16px;
}
.policy-img {
    width: 100%;
    max-width: 100%;
    display: block;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.1);
}

/* ====== 底部优惠信息 ====== */
.promo-section {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 0 16px;
}
.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}
.promo-card {
    background: linear-gradient(145deg, rgba(220,53,69,.15), rgba(220,53,69,.05));
    border: 1px solid rgba(220,53,69,.25);
    border-radius: 12px;
    padding: 14px 12px;
    text-align: center;
}
.promo-tag {
    display: inline-block;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    letter-spacing: 1px;
}
.promo-value {
    font-size: 20px;
    font-weight: 800;
    color: #ffd700;
}
.promo-value small { font-size: 13px; color: rgba(255,215,0,.7); }
.promo-desc {
    font-size: 11px;
    color: rgba(255,255,255,.5);
    margin-top: 4px;
    line-height: 1.4;
}

/* ====== 成功弹窗 ====== */
.modal-mask {
    position: fixed; top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,.65);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    opacity: 0; visibility: hidden;
    transition: all .3s ease;
}
.modal-mask.show { opacity: 1; visibility: visible; }
.modal-content {
    background: linear-gradient(145deg, #1e3054, #142140);
    border-radius: 20px;
    border: 1px solid rgba(212,160,23,.3);
    padding: 40px 32px 32px;
    text-align: center;
    width: 88%;
    max-width: 360px;
    transform: scale(.85);
    transition: transform .35s cubic-bezier(.175,.885,.32,1.275);
}
.modal-mask.show .modal-content { transform: scale(1); }

.modal-icon {
    width: 64px; height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
    color: #fff;
    box-shadow: 0 4px 20px rgba(39,174,96,.4);
}
.modal-title { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.modal-msg { font-size: 14px; color: rgba(255,255,255,.6); line-height: 1.6; margin-bottom: 24px; }
.modal-close {
    display: inline-block;
    padding: 10px 40px;
    background: linear-gradient(135deg, #d4a017, #f0c040);
    border: none;
    border-radius: 25px;
    color: #1a1a2e;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s;
}
.modal-close:hover { transform: scale(1.05); }

/* ====== 页脚 ====== */
.footer {
    text-align: center;
    padding: 20px 16px 40px;
    font-size: 11px;
    color: rgba(255,255,255,.3);
    line-height: 1.8;
}

/* ====== PC端整体适配 ====== */
@media (min-width: 768px) {
    .form-section {
        padding: 36px 40px 44px;
        margin: -40px auto 40px;
        border-radius: 24px;
    }
    .form-title { font-size: 26px; }
    .form-input, .form-select { height: 50px; font-size: 16px; border-radius: 12px; }
    .submit-btn { height: 56px; font-size: 20px; letter-spacing: 8px; }
    .promo-grid { grid-template-columns: repeat(5, 1fr); gap: 14px; }
    .promo-section { padding: 0 20px; }
    .policy-section { padding: 0 20px; }
}
