/* =====================================================
   主题样式表 - theme.css
   路径: themes/rad-theme/assets/css/theme.css
   说明: Rad Power Bikes 风格完整样式
===================================================== */

/* ===== CSS 变量 ===== */
:root {
    --rad-orange: #e85d04;
    --rad-orange-dark: #d54e00;
    --rad-orange-light: #ff9e00;
    --rad-black: #1a1a1a;
    --rad-gray: #666;
    --rad-gray-light: #999;
    --rad-bg-light: #f8f9fa;
    --rad-border: #e5e5e5;
    --rad-yellow: #ffb800;
    --rad-green: #28a745;
    --rad-red: #dc3545;
    --rad-shadow: 0 4px 20px rgba(0,0,0,0.06);
    --rad-shadow-hover: 0 12px 40px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
}

/* ===== 全局基础 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--rad-black);
    line-height: 1.6;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

/* ===== 通用按钮 ===== */
.btn-rad {
    background: var(--rad-orange);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 4px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-rad:hover {
    background: var(--rad-orange-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(232,93,4,0.4);
}

/* ============================================
   1. 公告栏
============================================ */
.announcement-bar {
    background: var(--rad-black);
    color: #fff;
    padding: 8px 0;
    font-size: 13px;
}
.announcement-bar p { margin: 0; }
.announcement-link {
    color: var(--rad-yellow);
    margin-left: 8px;
    font-weight: 600;
}
.announcement-link:hover { color: #fff; }

/* ============================================
   2. 导航栏
============================================ */
.main-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    z-index: 1000;
}
.navbar { padding: 12px 0; }
.navbar-brand {
    font-size: 24px;
    font-weight: 800;
    color: var(--rad-orange) !important;
}
.navbar-brand i { margin-right: 6px; }
.navbar-nav .nav-link {
    font-weight: 500;
    color: #333;
    padding: 15px 18px;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.navbar-nav .nav-link:hover { color: var(--rad-orange); }

/* Mega Menu */
.mega-menu {
    width: 100vw;
    max-width: 100vw;
    left: 0 !important;
    right: 0 !important;
    border: none;
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    padding: 30px 0;
    margin-top: 0;
}
.mega-menu h6 {
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--rad-orange);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}
.mega-menu .dropdown-item {
    padding: 6px 0;
    font-size: 14px;
    color: #444;
    transition: color 0.15s;
}
.mega-menu .dropdown-item:hover {
    background: none;
    color: var(--rad-orange);
}
.mega-menu-banner .banner-card {
    background: var(--rad-bg-light);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

/* 导航工具 */
.nav-tools { gap: 15px; }
.nav-tool-link {
    font-size: 20px;
    color: #333;
    position: relative;
    transition: color 0.2s;
}
.nav-tool-link:hover { color: var(--rad-orange); }
.cart-badge {
    position: absolute;
    top: -8px; right: -8px;
    background: var(--rad-orange);
    color: #fff;
    font-size: 10px;
    border-radius: 50%;
    width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
}
.region-selector select {
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    padding: 4px 8px;
}

/* ============================================
   3. HERO
============================================ */
.hero-section { position: relative; }
.hero-bg {
    min-height: 75vh;
    display: flex;
    align-items: center;
}
.hero-content { color: #fff; }
.hero-title {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
}
.hero-subtitle {
    font-size: clamp(16px, 2vw, 22px);
    margin-bottom: 30px;
    opacity: 0.95;
}
.hero-cta-group { display: flex; gap: 15px; flex-wrap: wrap; }
.hero-cta-group .btn { padding: 14px 32px; font-size: 16px; }
.trust-badges { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 30px; }
.badge-trust {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ============================================
   4. 卖点条
============================================ */
.feature-bar {
    background: var(--rad-bg-light);
    padding: 40px 0;
    border-bottom: 1px solid var(--rad-border);
}
.feature-bar h5 { font-weight: 700; margin-top: 10px; font-size: 16px; }
.feature-bar p { color: var(--rad-gray); font-size: 13px; margin: 0; }
.feature-bar i { color: var(--rad-orange); }

/* ============================================
   5. 选车卡片
============================================ */
.section-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--rad-black);
}
.ride-card {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border-radius: 12px;
    overflow: hidden;
    flex: 0 0 500px;
    display: flex !important;
    flex-direction: column !important;
    backface-visibility: hidden;
}
.ride-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}

.ride-card-img {
    position: relative;
    width: 100%;
    /* 现代浏览器：5:4比例 */
    aspect-ratio: 5 / 4;
    /* 给老360极速做降级兜底，内核不认aspect‑ratio就会启用这个高度 */
    height: 400px;
    overflow: hidden;
    background:#ffffff;
    flex: 0 0 auto;
}

.ride-card-img img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center bottom;
}

.img-default {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.img-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backface-visibility: hidden;
}

.ride-card:hover .img-hover {
    opacity: 1;
}

.ride-card-body {
    padding: 1.25rem;
    flex-grow: 1;
}
.ride-card-body h4 {
    font-weight: 700;
    margin-bottom: 10px;
}

/* ============================================
   6. Quiz CTA
============================================ */
.quiz-cta { background: #fff; }
.quiz-card {
    background: linear-gradient(135deg, var(--rad-orange) 0%, var(--rad-orange-light) 100%);
    color: #fff;
    padding: 60px 40px;
    border-radius: 16px;
    text-align: center;
}
.quiz-card h2 { font-weight: 800; margin-bottom: 15px; }
.quiz-card .btn-rad {
    background: #fff;
    color: var(--rad-orange);
    margin-top: 15px;
}
.quiz-card .btn-rad:hover {
    background: var(--rad-black);
    color: #fff;
}

/* ============================================
   7. 品牌故事
============================================ */
.brand-story { background: var(--rad-bg-light); }
.story-image-placeholder {
    background: #ddd;
    height: 400px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
}

/* ============================================
   8. 用户评价
============================================ */
.reviews-section { background: #fff; }
.review-card {
    background: var(--rad-bg-light);
    padding: 30px;
    border-radius: 12px;
    height: 100%;
}
.review-card .stars { color: var(--rad-yellow); font-size: 18px; margin-bottom: 15px; }
.review-card p { font-style: italic; margin-bottom: 15px; }
.reviewer { font-size: 13px; color: var(--rad-gray); font-style: normal !important; }

/* ============================================
   9. 产品卡片
============================================ */
.bestsellers { background: var(--rad-bg-light); }
.product-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    position: relative;
    height: 100%;
    transition: transform 0.3s;
    border: 1px solid var(--rad-border);
    backface-visibility: hidden;
}
.product-card:hover { transform: translateY(-3px); }

.product-badge {
    position: absolute;
    top: 16px; left: 16px;
    background: var(--rad-orange);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}
.product-badge.new { background: var(--rad-green); }
.product-badge.sale { background: var(--rad-red); }

.product-img-placeholder {
    background: #f5f5f5;
    /* 现代浏览器 1:1正方形，匹配533*533 */
    aspect-ratio: 1 / 1;
    /* 360极速旧内核降级兜底 */
    height: 0;
    padding-top: 100%;
    border-radius: 8px;
    display: block;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}
.product-img-placeholder img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    backface-visibility: hidden;
}

/* 默认图、悬浮图都绝对定位叠放 */
.product-img-placeholder .img-default {
    z-index: 1;
}
.product-img-placeholder .img-hover {
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}
.product-card:hover .img-hover {
    opacity: 1;
}

.product-specs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 15px 0;
    font-size: 13px;
    color: var(--rad-gray);
}
.product-specs span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* 产品标题 h4：只允许1行，溢出显示省略号 */
.product-card h4 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin‑bottom:10px;
}

/* 规格描述 p：最多2行 */
.product-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    min-height: 3em;
    margin:12px 0;
}

.product-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--rad-orange);
    margin: 15px 0;
}
.original-price {
    font-size:16px;
}

/* ============================================
   10. 门店/服务 CTA
============================================ */
.store-service-cta { background: #fff; }
.cta-card {
    background: var(--rad-bg-light);
    padding: 50px 30px;
    border-radius: 12px;
    height: 100%;
    text-align: center;
}
.cta-card i { color: var(--rad-orange); }

/* ============================================
   11. 优惠卡片
============================================ */
.deals-section { background: #fff; }
.deal-card {
    border: 1px solid var(--rad-border);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    transition: box-shadow 0.3s;
    backface-visibility: hidden;
}
.deal-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

/* 图片容器：533*533正方形，aspect‑ratio现代浏览器，padding‑top兜底360极速 */
.deal-img-placeholder {
    background: #f5f5f5;
    aspect-ratio: 1 / 1;
    height: 0;
    padding-top: 100%;
    position: relative;
    overflow: hidden;
}
.deal-img-placeholder img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    backface-visibility: hidden;
}
.deal-img-placeholder .img-default {
    z-index: 1;
}
.deal-img-placeholder .img-hover {
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}
.deal-card:hover .deal-img-placeholder .img-hover {
    opacity: 1;
}

.deal-info {
    padding: 20px;
}

/* 产品标题：强制单行，超长省略 */
.deal-info h4 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 10px 0;
}

.deal-rating {
    font-size: 13px;
    color: var(--rad-yellow);
    margin-bottom: 8px;
}

/* quick_spec规格，最多2行截断，短内容占位保持卡片等高 */
.deal-specs {
    font-size: 13px;
    color: var(--rad-gray);
    margin: 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    min-height: 3em;
}

.deal-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--rad-orange);
    margin: 10px 0;
}
.deal-price .original {
    font-size: 16px;
    text-decoration: line-through;
    color:#999;
    font-weight:normal;
    margin-left:10px;
}

/* ============================================
   12. 邮件订阅
============================================ */
.newsletter-section { background: var(--rad-black); }
.newsletter-card {
    color: #fff;
    padding: 20px;
    text-align: center;
}
.newsletter-form { max-width: 500px; margin: 20px auto 0; }
.newsletter-form .form-control {
    height: 50px;
    border-radius: 4px 0 0 4px;
    border: none;
}
.newsletter-form .btn {
    height: 50px;
    border-radius: 0 4px 4px 0;
    padding: 0 30px;
}

/* ============================================
   13. 页脚
============================================ */
.main-footer {
    background: #111;
    color: #ccc;
    padding: 60px 0 30px;
}
.main-footer h6 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: #999;
    font-size: 14px;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--rad-orange); }

.social-links { display: flex; gap: 15px; }
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    background: #222;
    color: #ccc;
    border-radius: 50%;
    font-size: 18px;
    transition: var(--transition);
}
.social-links a:hover {
    background: var(--rad-orange);
    color: #fff;
}

.payment-icons { display: flex; gap: 10px; align-items: center; color: #888; }

.footer-bottom {
    border-top: 1px solid #222;
    margin-top: 40px;
    padding-top: 20px;
    font-size: 13px;
    color: #666;
}
.footer-bottom a { color: #888; margin: 0 8px; }
.footer-bottom a:hover { color: var(--rad-orange); }

/* ============================================
   14. 响应式
============================================ */
@media (max-width: 991px) {
    .mega-menu { width: 100% !important; }
    .hero-title { font-size: 40px; }
}
@media (max-width: 768px) {
    .hero-title { font-size: 32px; }
    .hero-cta-group { flex-direction: column; }
    .hero-cta-group .btn { width: 100%; justify-content: center; }
    .trust-badges { gap: 10px; }
    .badge-trust { font-size: 11px; padding: 6px 12px; }
    .section-title { font-size: 24px; }
    .navbar-nav .nav-link { padding: 10px 15px; }
    .quiz-card { padding: 40px 20px; }
    .feature-bar .col-md-3 { margin-bottom: 20px; }
    .newsletter-form .form-control,
    .newsletter-form .btn { height: 45px; }
}
@media (max-width: 576px) {
    .hero-bg { min-height: 60vh; }
    .hero-title { font-size: 28px; }
    .product-card { padding: 16px; }
    .product-price { font-size: 22px; }
}

/* deals页面 350*350正方形图片容器，无图同样占位，兼容360极速 */
.deal-img-350-wrap {
    background:#f5f5f5;
    aspect-ratio:1/1;
    height:0;
    padding-top:100%;
    position:relative;
    overflow:hidden;
    border-radius:8px;
}
.deal-img-350-wrap img {
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    object-fit:cover;
    backface-visibility:hidden;
}
.deal-img-350-wrap .img-default {
    z-index:1;
}
.deal-img-350-wrap .img-hover {
    opacity:0;
    transition: opacity 0.3s ease;
    z-index:2;
}
.product-card:hover .deal-img-350-wrap .img-hover {
    opacity:1;
}
/* 无图片占位 */
.deal-img-350-wrap .img-placeholder-empty {
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
}

/* 标题：单行，超长省略 */
.product-card-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* quick‑spec：最多2行 */
.product-card-spec {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height:1.45;
    min-height:2.9em;
}

/* deals hero背景 */
.deals-hero {
    background:linear-gradient(135deg,#e63946,#b71c1c);
}