/* Custom Styles for SUS Racing Website */

/* General Styles */
html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Header Styles */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #c8102e;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Slider Styles */
.hero-swiper {
    --swiper-navigation-size: 14px;
    --swiper-pagination-color: #c8102e;
    --swiper-pagination-bullet-inactive-color: rgba(255, 255, 255, 0.5);
    --swiper-pagination-bullet-inactive-opacity: 1;
}

.hero-swiper .swiper-pagination-bullet {
    width: 18px;
    height: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
}

.hero-swiper .swiper-pagination-bullet-active {
    width: 35px;
    height: 10px;
    border-radius: 5px;
    background: #c8102e;
}

.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
    transition: all 0.3s ease;
}

.hero-swiper .swiper-button-prev:hover,
.hero-swiper .swiper-button-next:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

/* News Cards */
.news-card {
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateX(5px);
}

/* Footer Styles */
footer {
    margin-top: auto;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-swiper .swiper-button-prev,
    .hero-swiper .swiper-button-next {
        display: none;
    }
    
    .hero-swiper h1 {
        font-size: 2rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c8102e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a00d25;
}

/* Selection Color */
::selection {
    background-color: #c8102e;
    color: white;
}

/* Form Styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #c8102e;
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

/* Button Hover Effects */
.btn-primary {
    background-color: #c8102e;
    color: white;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #a00d25;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.3);
}

/* Image Placeholder */
.img-placeholder {
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-placeholder::before {
    content: '图片加载中...';
    color: #666;
}

/* Sidebar Category Active State */
.category-active {
    background-color: white;
    color: #c8102e;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Mobile Menu Animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.active {
    max-height: 500px;
}

/* Breadcrumb Styles */
.breadcrumb-link {
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: #c8102e;
}

/* Contact Form Styles */
.contact-form input,
.contact-form textarea {
    border: 1px solid #e5e5e5;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #c8102e;
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

/* Stats Counter Animation */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* Print Styles */
@media print {
    header,
    footer,
    .no-print {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
