/* 自定义变量 */
:root {
    --primary-color: #052c65;
    --secondary-color: #0d6efd;
    --accent-color: #ffc107;
    --success-color: #198754;
    --warning-color: #fd7e14;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --dark-bg: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
}

/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color:#fff !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
}

/* Hero区域样式 */
.hero-section {
    /*padding-top: 65px;*/
    position: relative;
    overflow: hidden;
}

/* 轮播图样式 */
.carousel {
    position: relative;
}

.carousel-background {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.carousel-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.carousel-background .container {
    position: relative;
    z-index: 2;
}

/* 轮播图指示器样式 */
.carousel-indicators {
    bottom: 30px;
    z-index: 3;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    margin: 0 5px;
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background-color: #fff;
    transform: scale(1.2);
}

/* 轮播图控制按钮样式 */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 20px;
    transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 30px;
    height: 30px;
}

/* 轮播图内容样式 */
.carousel-item {
    transition: transform 0.6s ease-in-out;
}

.carousel-item .display-4 {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.carousel-item .lead {
    font-size: 1.25rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.carousel-item img {
    max-height: 500px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.carousel-item:hover img {
    transform: scale(1.05);
}

/* 轮播图按钮样式 */
.carousel-item .btn {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.carousel-item .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 轮播图动画效果 */
.carousel-item.active .display-4 {
    animation: slideInLeft 0.8s ease-out;
}

.carousel-item.active .lead {
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

.carousel-item.active .btn {
    animation: slideInUp 0.8s ease-out 0.4s both;
}

.carousel-item.active img {
    animation: slideInRight 0.8s ease-out 0.3s both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .carousel-item .display-4 {
        font-size: 2rem;
    }
    
    .carousel-item .lead {
        font-size: 1rem;
    }
    
    .carousel-item .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
        margin: 0 10px;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 20px;
        height: 20px;
    }
    
    .carousel-indicators {
        bottom: 20px;
    }
    
    .carousel-indicators button {
        width: 10px;
        height: 10px;
        margin: 0 3px;
    }
}

@media (max-width: 576px) {
    .carousel-item .display-4 {
        font-size: 1.75rem;
    }
    
    .carousel-background {
        min-height: 80vh;
    }
    
    .carousel-item img {
        max-height: 300px;
        margin-top: 2rem;
    }
}

/* 特性卡片样式 */
.feature-icon {
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

/*.card:hover .feature-icon {
    transform: scale(1.1);
}*/

.card {
    /*transition: transform 0.3s ease, box-shadow 0.3s ease;*/
    border-radius: 15px;
}

/*.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}*/

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #031f4a;
    border-color: #031f4a;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 产品卡片样式 */
.product-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(5,44,101,0.08);
    overflow: hidden;
    /*transition: box-shadow 0.3s, transform 0.3s;*/
    /*min-height: 340px;*/
}

.product-card:hover {
    box-shadow: 0 8px 32px rgba(5,44,101,0.18);
    transform: translateY(-4px) scale(1.02);
}

.product-card .card-img-top {
    height: 200px;
    object-fit: contain;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
}

.product-card .card-body {
    padding: 12px 16px 10px 16px;
}

.product-card .product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: #052c65;
    line-height: 1.3;
}

.product-card .product-desc {
    font-size: 0.92rem;
    color: #6c757d;
    margin-bottom: 4px;
}

.product-card .product-price {
    color: #fd7e14;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 2px;
}

.product-card .product-seller {
    font-size: 0.9rem;
    color: #ffc107;
    font-weight: bold;
    margin-bottom: 2px;
}

.product-card .product-rating {
    color: #ff9800;
    font-size: 1rem;
    margin-bottom: 2px;
}

.product-card .product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 2px;
}

/* 页脚样式 */
footer {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #343a40 100%);
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.875rem;
}

/* 模态框样式 */
.modal-header {
    background-color: var(--primary-color);
    color: white;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* 表单样式 */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(5, 44, 101, 0.25);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(5, 44, 101, 0.25);
}

/* 面包屑导航 */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: var(--text-muted);
}

/* 分页样式 */
.page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
}

.page-link:hover {
    color: var(--primary-color);
    background-color: var(--light-bg);
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 标签样式 */
.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

/* 进度条样式 */
.progress-bar {
    background-color: var(--primary-color);
}

/* 警告框样式 */
.alert-primary {
    background-color: rgba(5, 44, 101, 0.1);
    border-color: rgba(5, 44, 101, 0.2);
    color: var(--primary-color);
}

/* 表格样式 */
.table-primary {
    background-color: rgba(5, 44, 101, 0.1);
}

.table-primary th,
.table-primary td {
    border-color: rgba(5, 44, 101, 0.2);
}

/* 列表组样式 */
.list-group-item-primary {
    background-color: rgba(5, 44, 101, 0.1);
    border-color: rgba(5, 44, 101, 0.2);
    color: var(--primary-color);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #031f4a;
}

/* 打印样式 */
@media print {
    .navbar,
    .footer,
    .btn,
    .social-links {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero-section {
        background: none !important;
        color: black !important;
    }
}

.product-section-title {
    background: var(--primary-color);
    color: #fff;
    padding: 8px 16px;
    font-weight: bold;
    font-size: 1.2rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.product-section-title i {
    margin-right: 8px;
    font-size: 1.1em;
}

/* 产品卡片角标 */
.product-badge-hot {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #dc3545;
    color: #fff;
    font-size: 0.85rem;
    font-weight: bold;
    padding: 2px 10px;
    border-radius: 8px 8px 8px 0;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(220,53,69,0.12);
}

.carousel-control-prev {
    left: 2.5rem;
}
.carousel-control-next {
    right: 5.5rem;
}
@media (max-width: 900px) {
    .carousel-control-prev {
        left: 0.5rem;
    }
    .carousel-control-next {
        right: 3.5rem;
    }
}


/* 下拉菜单hover效果 */
.navbar-nav .dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 2px;
    margin-top: 0;
    padding: 8px 0;
}

.navbar-nav .dropdown-item {
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #333;
}

    .navbar-nav .dropdown-item:hover {
        background-color: var(--primary-color);
        color: white;
        /*transform: translateX(5px);*/
    }

    .navbar-nav .dropdown-item i {
        width: 16px;
        text-align: center;
    }

.navbar-nav .dropdown-divider {
    margin: 8px 0;
    border-color: #e9ecef;
}

/* 下拉菜单动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端下拉菜单样式 */
@media (max-width: 991.98px) {
    .navbar-nav .dropdown:hover .dropdown-menu {
        display: none;
    }

    .navbar-nav .dropdown.show .dropdown-menu {
        display: block;
    }
}


/* 搜索框样式 */
.search-section {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
    margin-top: 65px;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 50px;
    width: auto;
    /*filter: brightness(0) invert(1);
    transition: filter 0.3s ease;*/
}

    /*.logo-image:hover {
        filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(45deg);
    }*/

.search-box {
    display: flex;
    align-items: center;
    max-width: 650px;
    width: 100%;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 3px 0 0 3px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.3s ease;
    background: #fff;
    height: 42px;
}

    .search-input:focus {
        border-color: var(--primary-color);
    }

    .search-input::placeholder {
        color: #999;
        font-style: normal;
        font-size: 12px;
    }

.search-button {
    background-color: #052c65;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 0 3px 3px 0;
    font-weight: bold;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    height: 42px;
    position: relative;
    overflow: visible;
}

    .search-button::before {
        content: '';
        position: absolute;
        left: -5px;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 5px 5px 5px 0;
        border-color: transparent #052c65 transparent transparent;
    }

/*    .search-button:hover {
        background: #e0a800;
    }*/

.search-text {
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.3px;
    color: #fff;
}

/* 搜索框响应式设计 */
@media (max-width: 768px) {
    .search-section {
        padding: 8px 0;
    }

    .search-container {
        justify-content: center;
        gap: 20px;
        flex-direction: column;
    }

    .logo-image {
        height: 40px;
    }

    .search-box {
        max-width: 280px;
        margin: 0 15px;
    }

    .search-input {
        padding: 5px 8px;
        font-size: 12px;
        height: 28px;
    }

    .search-button {
        padding: 5px 10px;
        font-size: 10px;
        height: 28px;
    }
}

@media (max-width: 576px) {
    .search-section {
        padding: 6px 0;
    }

    .search-container {
        gap: 15px;
    }

    .logo-image {
        height: 35px;
    }

    .search-box {
        max-width: 220px;
        margin: 0 10px;
    }

    .search-input {
        padding: 4px 6px;
        font-size: 11px;
        height: 26px;
    }

    .search-button {
        padding: 4px 8px;
        font-size: 9px;
        height: 26px;
    }
}
