:root {
    --brand:   #0d2a4a;
    --brand-2: #1f5da8;
    --soft:    #f5f7fb;
}

body {
    background: var(--soft);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Top utility bar ---------- */
.topbar {
    background: #0a1f37;
    color: #cbd5e1;
    font-size: 13px;
}
.topbar a { color: #cbd5e1; text-decoration: none; }
.topbar a:hover { color: #fff; }

/* ---------- Navbar ---------- */
.main-nav {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}
.brand-logo {
    font-weight: 800;
    font-size: 22px;
    color: var(--brand);
    letter-spacing: .5px;
}
.brand-logo .dot { color: var(--brand-2); }

.cart-btn { position: relative; }
.cart-btn .cart-count {
    position: absolute;
    top: -6px; right: -6px;
    background: var(--brand-2);
    color: #1a1a1a;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Hero ---------- */
.hero {
    background:
        linear-gradient(120deg, rgba(13,42,74,.92), rgba(13,42,74,.78)),
        url('https://images.unsplash.com/photo-1486262715619-67b85e0b08d3?auto=format&fit=crop&w=1600&q=60') center/cover no-repeat;
    color: #fff;
    padding: 56px 0 72px;
}

.hero .hero-container {
    max-width: 1600px;
    padding-left: 2rem;
    padding-right: 2rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-search {
    width: 100%;
}
.hero h1 { font-weight: 800; font-size: 40px; }
.hero p  { color: #cbd5e1;   font-size: 17px; }

.hero-search {
    background: #fff;
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.hero-search .form-control,
.hero-search .form-select {
    border: 0;
    box-shadow: none !important;
    font-size: 16px;
    padding: 14px 16px;
}
.hero-search .divider { border-left: 1px solid #e5e7eb; }
.hero-search .btn-search {
    background: var(--brand-blue, #1f5da8);
    color: #fff;
    font-weight: 700;
    border: 0;
    padding: 14px 26px;
    border-radius: 10px;
}
.hero-search .btn-search:hover { background: var(--brand-blue-dark, #15457f); color: #fff; }

.suggest-box {
    position: absolute; z-index: 9999;
    background: #fff;
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-top: 6px;
    box-shadow: 0 10px 25px rgba(0,0,0,.15);
    display: none; overflow: hidden;
    color: #111; text-align: left;
}
.suggest-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
}
.suggest-item:hover { background: #f3f6ff; }

/* ---------- Sidebar filters ---------- */
.filter-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #eef0f4;
}
.filter-card .filter-head {
    padding: 14px 16px;
    border-bottom: 1px solid #eef0f4;
    font-weight: 700;
    display: flex; align-items: center; justify-content: space-between;
}
.filter-card .filter-body { padding: 12px 16px; }
.filter-list { max-height: 240px; overflow-y: auto; }
.filter-list a {
    display: flex; justify-content: space-between;
    padding: 6px 4px;
    color: #334155;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
}
.filter-list a:hover { background: #f3f6ff; }
.filter-list a.active {
    background: #eef2ff;
    color: var(--brand);
    font-weight: 600;
}

/* ---------- Product cards ---------- */
.product-card {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 14px;
    overflow: hidden;
    transition: 0.18s;
    display: flex; flex-direction: column;
    height: 100%;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(13,42,74,.12);
    border-color: #dde2ec;
}
.product-thumb {
    background: #f8fafc;
    height: 200px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.product-thumb img {
    max-height: 90%; max-width: 90%; object-fit: contain;
}
.product-thumb .no-img {
    color: #94a3b8; font-size: 13px;
}
.product-thumb .pill-oem {
    position: absolute; top: 10px; right: 10px;
    background: var(--brand);
    color: #fff;
    font-size: 11px; font-weight: 600;
    padding: 4px 8px; border-radius: 999px;
}
.product-body {
    padding: 14px 16px;
    display: flex; flex-direction: column; gap: 6px;
    flex: 1;
}
.product-body .group {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #64748b;
    min-height: 14px;
    line-height: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-body .code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 700; color: var(--brand);
    font-size: 15px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-body .desc {
    color: #1e293b;
    font-size: 14px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.35em * 2); /* always reserve 2 lines */
}
.product-card .card-cta { padding: 0 16px 16px; }
.product-card .card-cta .btn {
    border-radius: 10px;
    font-weight: 600;
}

/* ---------- Footer ---------- */
footer.site-footer {
    background: #0a1f37;
    color: #94a3b8;
    margin-top: 60px;
    padding: 40px 0 24px;
    font-size: 14px;
}
footer.site-footer h6 {
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: .5px;
}
footer.site-footer a { color: #94a3b8; text-decoration: none; }
footer.site-footer a:hover { color: #fff; }

/* ---------- Bits ---------- */
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    color: #334155;
    text-decoration: none;
}
.chip:hover { background: #f3f6ff; }
.chip .bi-x-lg { font-size: 11px; }

.cart-table th,
.cart-table td { vertical-align: middle; }

@media (max-width: 768px) {
    .hero      { padding: 36px 0 48px; }
    .hero h1   { font-size: 28px; }
    .product-thumb { height: 160px; }
}
