/* ─── Base ─────────────────────────────────────────── */
:root {
    --primary: #1a56db;
    --primary-dark: #0f3a8e;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: #333;
}

/* ─── Navbar ───────────────────────────────────────── */
.navbar {
    backdrop-filter: blur(8px);
}
.navbar .nav-link {
    position: relative;
    padding: 8px 14px;
    font-size: 14px;
    transition: color .2s;
}
.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #fff;
    transition: all .3s;
    transform: translateX(-50%);
}
.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
    width: 60%;
}

/* ─── Hero ─────────────────────────────────────────── */
.hero-section {
    min-height: 80vh;
    background: linear-gradient(135deg, #0f3a8e 0%, #1a56db 50%, #2563eb 100%);
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255,255,255,.03);
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeInUp .8s ease-out;
}
.hero-section .lead {
    animation: fadeInUp .8s ease-out .2s both;
}
.hero-section .mt-4 {
    animation: fadeInUp .8s ease-out .4s both;
}

/* ─── Product Cards ────────────────────────────────── */
.product-card {
    transition: transform .25s, box-shadow .25s;
    overflow: hidden;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,.12) !important;
}
.product-img-wrapper {
    height: 200px;
    overflow: hidden;
}
.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.product-card:hover .product-img-wrapper img {
    transform: scale(1.05);
}

/* ─── Page Header ──────────────────────────────────── */
.page-header {
    background: linear-gradient(135deg, #0f3a8e 0%, #1a56db 100%);
}

/* ─── Fault Cards ──────────────────────────────────── */
.fault-card {
    border-left: 4px solid var(--primary);
    transition: box-shadow .2s;
}
.fault-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,.1) !important;
}
.solution-box {
    border-left: 3px solid #198754;
}

/* ─── Buttons ──────────────────────────────────────── */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ─── Footer ───────────────────────────────────────── */
footer a:hover {
    color: #fff !important;
}

/* ─── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
    }
    .hero-section h1 {
        font-size: 2rem;
    }
    .hero-carousel { height: 50vh; min-height: 300px; }
    .hero-carousel .slide-content { bottom: 15%; left: 5%; max-width: 90%; }
    .hero-carousel .slide-content h1 { font-size: 1.5rem; }
    .hero-carousel .slide-content p { font-size: .9rem; }

    .page-header { padding: 2rem 0 !important; }
    .page-header h1 { font-size: 1.5rem; }
    .page-header .lead { font-size: 1rem; }

    .content-area { padding: 16px !important; }
    .topbar { padding: 10px 16px !important; }
    .topbar h6 { font-size: .85rem; }

    .product-grid-card .card-img-top { height: 140px; }
    .product-img-wrapper { height: 140px; }

    .cat-card { min-height: 120px; }
    .cat-card .cat-label h5 { font-size: .9rem; }

    .table-responsive { font-size: .85rem; }

    .fault-search-bar { padding: 1.5rem 0; }
    .fault-search-bar h3 { font-size: 1.2rem; }

    footer h5 { font-size: 1rem; }
}

@media (max-width: 576px) {
    .hero-carousel { height: 40vh; min-height: 240px; }
    .product-grid-card .card-img-top { height: 110px; }
    .product-img-wrapper { height: 110px; }
    .cat-card { min-height: 90px; }
    .content-area { padding: 12px !important; }
    .stat-card .display-6 { font-size: 1.5rem; }
    .stat-card h3, .stat-card h2 { font-size: 1.3rem; }
}

/* ─── Admin Tweaks ─────────────────────────────────── */
.card { border-radius: 10px; }
.table > :not(caption) > * > * { padding: 12px 16px; vertical-align: middle; }

/* ─── Breadcrumb tweaks ────────────────────────────── */
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.5); }
