@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");

:root {
    /* Color Palette - Modern Premium Light */
    --primary: #4f46e5;
    /* Indigo */
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --accent: #f59e0b;
    /* Amber */
    --bg-main: #f8fafc;
    /* Slate 50 */
    --bg-card: #ffffff;
    --text-main: #0f172a;
    /* Slate 900 */
    --text-muted: #64748b;
    /* Slate 500 */
    --text-on-primary: #ffffff;

    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-premium: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding-top: 100px !important; /* Space for fixed navbar */
    -webkit-font-smoothing: antialiased;
}

@media (max-width: 991.98px) {
    body {
        padding-top: 80px !important;
    }
}

.breadcrumb-wrapper {
    margin-top: 1rem !important;
    margin-bottom: 2rem;
    padding-left: 15px;
    padding-right: 15px;
}

/* Navbar Redesign */
.navbar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.75rem 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.025em;
    color: var(--text-main) !important;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
}

.nav-link {
    font-weight: 600;
    color: var(--text-main) !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--primary) !important;
    background: var(--bg-main);
}

/* Hero Section Enhancement */
.hero-section {
    padding: 100px 0;
    background: radial-gradient(circle at 70% 30%, rgba(79, 70, 229, 0.05) 0%, transparent 60%);
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
}

/* Premium Cards */
.category-card {
    background: var(--bg-card);
    border: none;
    border-radius: 24px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
    height: 100%;
    text-decoration: none !important;
    display: block;
}

.category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: 24px;
    transition: border-color 0.3s ease;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px -12px rgba(79, 70, 229, 0.15);
}

.category-card:hover::after {
    border-color: var(--primary-light);
}

.category-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    background: var(--bg-main);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 20px;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    background: var(--primary);
    color: white;
    transform: rotate(10deg);
}

.category-name {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

/* Premium Buttons */
.btn-premium, .navbar-nav .nav-link.btn-premium {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    line-height: normal !important;
}

.btn-premium:hover, .navbar-nav .nav-link.btn-premium:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3) !important;
    color: #ffffff !important;
}

.btn-premium:active, .navbar-nav .nav-link.btn-premium:active {
    transform: translateY(1px) !important;
    box-shadow: 0 2px 5px rgba(79, 70, 229, 0.2) !important;
}

.btn-premium:focus, .navbar-nav .nav-link.btn-premium:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.4) !important;
}

/* Forms & Inputs */
.form-control {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Footer redesign */
.footer {
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    padding: 80px 0 40px;
    color: var(--text-muted);
}

.footer h5 {
    color: var(--text-main);
    font-weight: 800;
    margin-bottom: 2rem;
}

.footer-link {
    color: var(--text-muted);
    transition: color 0.2s ease;
    text-decoration: none;
}

.footer-link:hover {
    color: var(--primary);
}

/* Grid View Enhancements */
.grid-view {
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow-premium);
    padding: 1.5rem;
    border: none;
}

.table thead th {
    background: var(--bg-main);
    border: none;
    padding: 1.25rem;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.table td {
    padding: 1.25rem;
    border-color: #f1f5f9;
    vertical-align: middle;
}

/* Loading States & Transitions */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modern 404 Page */
.site-error-premium {
    min-height: 60vh;
    display: flex;
    align-items: center;
}
.error-visual h1 { font-size: 8rem; letter-spacing: -2px; }
.error-icon-wrapper { margin-top: -2rem; }
.shadow-premium { box-shadow: 0 10px 30px rgba(79, 70, 229, 0.15) !important; }

/* Modern Filter Sidebar */
.filter-sidebar-modern .filter-section { border-bottom: 1px solid #f0f0f0; padding-bottom: 1rem; }
.filter-sidebar-modern .filter-section:last-child { border-bottom: none; }
.ls-1 { letter-spacing: 1px; }
.font-size-sm { font-size: 0.75rem; }
.filter-options { display: flex; flex-direction: column; gap: 0.2rem; }
.custom-checkbox .form-check-input { width: 1.1rem; height: 1.1rem; margin-top: 0.15rem; border-color: #e0e0e0; cursor: pointer; }
.custom-checkbox .form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.custom-checkbox .filter-label { cursor: pointer; color: #4b5563; transition: color 0.2s ease; font-size: 0.85rem; line-height: 1.4; }
.custom-checkbox:hover .filter-label { color: var(--primary); }

.filter-toggle { cursor: pointer; display: block; }
.filter-toggle:hover h6 { color: var(--primary) !important; }
.filter-arrow { 
    display: inline-block; 
    width: 0.5rem; 
    height: 0.5rem; 
    border-right: 2px solid #9ca3af; 
    border-bottom: 2px solid #9ca3af; 
    transition: transform 0.3s ease; 
}
.filter-toggle:hover .filter-arrow { border-color: var(--primary); }
.filter-toggle[aria-expanded="false"] .filter-arrow { transform: rotate(45deg); margin-top: -4px;}
.filter-toggle[aria-expanded="true"] .filter-arrow { transform: rotate(-135deg); margin-top: 2px; }

/* Modern Breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
}
.breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
.breadcrumb-item a:hover { color: var(--primary); }
.breadcrumb-item.active { color: var(--text-main); font-weight: 600; }
.breadcrumb-item + .breadcrumb-item::before { content: "/"; font-size: 1rem; line-height: 1.2; padding: 0 0.5rem; color: #cbd5e1; }

/* Modern Pagination */
.pagination-modern { display: flex; justify-content: center; gap: 0.5rem; margin-top: 3rem; }
.pagination-modern .page-item { list-style: none; }
.pagination-modern .page-link { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px !important; border: 1px solid #e5e7eb; color: #4b5563; font-weight: 500; transition: all 0.2s ease; background: #fff; }
.pagination-modern .page-item.active .page-link { background-color: var(--primary) !important; border-color: var(--primary) !important; color: #fff !important; box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2); }
.pagination-modern .page-item.disabled .page-link { opacity: 0.5; background: #f9fafb; }
.pagination-modern .page-link:hover:not(.active) { background-color: #f3f4f6; border-color: #d1d5db; color: var(--primary); }

/* ═══════════════════════════════════════════════════════════════════════
   CATALOG — SECTION EYEBROW (общий заголовок секций)
   ═══════════════════════════════════════════════════════════════════════ */
.section-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
}
.section-eyebrow i { color: var(--primary); }

/* ═══════════════════════════════════════════════════════════════════════
   CATALOG — SUBCATEGORIES BLOCK
   ═══════════════════════════════════════════════════════════════════════ */
.subcats-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
    margin-bottom: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.subcats-eyebrow i { color: var(--primary); }

.subcats-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* a.subcat-pill — element+class (0-1-1) побеждает Bootstrap a (0-0-1) */
a.subcat-pill, .subcat-pill {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.45rem 1.15rem !important;
    background: rgba(79,70,229,.07) !important;
    border: 1.5px solid rgba(79,70,229,.22) !important;
    border-radius: 50px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: var(--primary) !important;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    line-height: 1.4 !important;
}
a.subcat-pill:hover, .subcat-pill:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(79,70,229,.3);
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════════════
   CATALOG — QUICK PICK / ТЕГИ
   ═══════════════════════════════════════════════════════════════════════ */
.quickpick-block {
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 16px;
    padding: 1.1rem 1.4rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.quickpick-groups { display: flex; flex-direction: column; }
.quickpick-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.quickpick-group:last-child { border-bottom: none; padding-bottom: 0; }
.quickpick-group:first-child { padding-top: 0; }

.quickpick-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 90px;
    flex-shrink: 0;
    padding-top: 0.25rem;
    line-height: 1.4;
}
.quickpick-label i { color: var(--primary); font-size: 0.8rem; }

.quickpick-pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* ── qpill: база + типы. Двойной класс (0-2-0) побеждает Bootstrap a (0-0-1) ── */
a.qpill, .qpill {
    display: inline-flex !important;
    align-items: center;
    padding: 0.28rem 0.78rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: filter 0.17s, transform 0.17s, box-shadow 0.17s;
    border: 1px solid #e2e8f0 !important;
    background: var(--bg-main) !important;
    color: var(--text-main) !important;
    line-height: 1.5;
}
/* Двойной класс + a — гарантированно перекрывает базу */
a.qpill.qpill--socket,  .qpill.qpill--socket  { background: #eff6ff !important; color: #1d4ed8 !important; border-color: #bfdbfe !important; }
a.qpill.qpill--brand,   .qpill.qpill--brand   { background: #f5f3ff !important; color: #6d28d9 !important; border-color: #ddd6fe !important; }
a.qpill.qpill--purpose, .qpill.qpill--purpose { background: #f0fdf4 !important; color: #15803d !important; border-color: #bbf7d0 !important; }
a.qpill.qpill--general, .qpill.qpill--general { background: #fff7ed !important; color: #c2410c !important; border-color: #fed7aa !important; }
a.qpill:hover, .qpill:hover { filter: brightness(0.93); transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,.1); }

/* ── tpill: те же правила для страниц тегов ── */
a.tpill, .tpill {
    display: inline-flex !important;
    align-items: center;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: filter 0.18s, transform 0.18s, box-shadow 0.18s;
    border: 1px solid #e2e8f0 !important;
    background: var(--bg-main) !important;
    color: var(--text-main) !important;
    line-height: 1.5;
}
a.tpill.tpill--socket,  .tpill.tpill--socket  { background: #eff6ff !important; color: #1d4ed8 !important; border-color: #bfdbfe !important; }
a.tpill.tpill--brand,   .tpill.tpill--brand   { background: #f5f3ff !important; color: #6d28d9 !important; border-color: #ddd6fe !important; }
a.tpill.tpill--purpose, .tpill.tpill--purpose { background: #f0fdf4 !important; color: #15803d !important; border-color: #bbf7d0 !important; }
a.tpill.tpill--general, .tpill.tpill--general { background: #fff7ed !important; color: #c2410c !important; border-color: #fed7aa !important; }
a.tpill:hover, .tpill:hover { filter: brightness(0.93); transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,.1); }

/* ═══════════════════════════════════════════════════════════════════════
   CATALOG — RECENTLY VIEWED
   ═══════════════════════════════════════════════════════════════════════ */
.rv-section {
    border-top: 1px solid #eef0f4;
    padding-top: 2rem;
    transition: opacity 0.3s ease;
}
.rv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.rv-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text-main);
}
.rv-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    background: rgba(79,70,229,.09);
    border-radius: 9px;
    font-size: 0.9rem;
    color: var(--primary);
    flex-shrink: 0;
}
.rv-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.rv-clear-btn:hover {
    border-color: #fca5a5;
    background: #fff5f5;
    color: #ef4444;
}

.btn-ghost {
    background: transparent;
    border: none;
    transition: color 0.2s ease;
}
.btn-ghost:hover { color: var(--primary) !important; }

@media (max-width: 575.98px) {
    .quickpick-label { min-width: 72px; font-size: 0.65rem; }
    .subcat-pill { font-size: 0.82rem; padding: 0.4rem 0.9rem; }
}

/* ═══════════════════════════════════════════════════════════════════════
   PRODUCT PAGE — QUICK SPECS GRID
   ═══════════════════════════════════════════════════════════════════════ */
.quick-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.qs-item {
    display: flex;
    flex-direction: column;
    background: var(--bg-main);
    border-radius: 12px;
    padding: 0.6rem 0.9rem;
    border-left: 3px solid var(--primary-light);
}
.qs-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.15rem;
}
.qs-value {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════════════
   PRODUCT PAGE — TABS NAV
   ═══════════════════════════════════════════════════════════════════════ */
.product-tab-nav {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.product-tab-nav::-webkit-scrollbar { display: none; }

.ptab-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.85rem 1.5rem;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    border-radius: 0;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.ptab-btn:hover { color: var(--primary); }
.ptab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════════
   PRODUCT PAGE — SPECS TABLE
   ═══════════════════════════════════════════════════════════════════════ */
.product-specs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.92rem;
}
.product-specs-table tbody tr {
    transition: background 0.15s ease;
}
.product-specs-table tbody tr:nth-child(even) {
    background: #f8fafc;
}
.product-specs-table tbody tr:hover {
    background: rgba(79, 70, 229, 0.03);
}
.product-specs-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}
.product-specs-table tr:last-child td {
    border-bottom: none;
}
.spec-label {
    width: 35%;
    min-width: 160px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
}
.spec-value {
    color: var(--text-main);
    vertical-align: middle;
}
.spec-chip {
    display: inline-block;
    background: var(--bg-main);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.2rem 0.6rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════════
   PRODUCT PAGE — INFO TILES
   ═══════════════════════════════════════════════════════════════════════ */
.product-info-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.info-tile {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    background: var(--bg-main);
    border-radius: 14px;
    padding: 1rem 1.1rem;
}
.info-tile-icon {
    font-size: 1.4rem;
    color: var(--primary);
    line-height: 1;
    flex-shrink: 0;
    margin-top: 0.1rem;
}
.info-tile-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-main);
    margin-bottom: 0.15rem;
}
.info-tile-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════════
   PRODUCT PAGE — DESCRIPTION
   ═══════════════════════════════════════════════════════════════════════ */
.product-desc-body {
    font-size: 1rem;
    line-height: 1.85;
    color: #374151;
    max-width: 860px;
}
.product-desc-body h2, .product-desc-body h3, .product-desc-body h4 {
    font-weight: 700;
    color: var(--text-main);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}
h2 {
    margin-bottom: 18px !important;
}
.product-desc-body p { margin-bottom: 1rem; }
.product-desc-body ul, .product-desc-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.product-desc-body li { margin-bottom: 0.4rem; }
.product-desc-body strong { color: var(--text-main); }
.product-desc-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}
.product-desc-body table th,
.product-desc-body table td {
    padding: 0.6rem 1rem;
    border: 1px solid #e2e8f0;
    text-align: left;
}
.product-desc-body table th {
    background: var(--bg-main);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════════════
   PRODUCT PAGE — COMPATIBILITY
   ═══════════════════════════════════════════════════════════════════════ */
.compat-section + .compat-section {
    border-top: 1px solid #f1f5f9;
    padding-top: 2rem;
}
.compat-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-main);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--primary);
    flex-shrink: 0;
}
.compat-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(79, 70, 229, 0.07);
    border: 1px solid rgba(79, 70, 229, 0.2);
    color: var(--primary);
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.87rem;
    font-weight: 600;
}
.compat-marks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.6rem;
}
.compat-mark-card {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}
.compat-mark-card:hover {
    border-color: var(--primary-light);
    background: rgba(79, 70, 229, 0.04);
}
.compat-models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
}
.compat-model-chip {
    display: flex;
    align-items: center;
    background: #f0fdf4;
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ═══════════════════════════════════════════════════════════════════════
   QTY STEPPER — Cart & Product Page
   ═══════════════════════════════════════════════════════════════════════ */
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    overflow: hidden;
    height: 40px;
}
.qty-stepper button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 100%;
    border: none;
    background: transparent;
    color: #4f46e5;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}
.qty-stepper button:hover  { background: rgba(79,70,229,.09); }
.qty-stepper button:active { background: rgba(79,70,229,.16); }
.qty-stepper .qty-input,
.qty-stepper input[type="number"] {
    width: 48px;
    height: 100%;
    border: none;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    background: #fff;
    text-align: center;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    outline: none;
    -moz-appearance: textfield;
    padding: 0;
}
.qty-stepper .qty-input::-webkit-outer-spin-button,
.qty-stepper .qty-input::-webkit-inner-spin-button,
.qty-stepper input[type="number"]::-webkit-outer-spin-button,
.qty-stepper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* Large variant for product detail page */
.qty-stepper-lg {
    height: 52px;
    border-radius: 14px;
    border-width: 2px;
}
.qty-stepper-lg button { width: 46px; font-size: 1.25rem; }
.qty-stepper-lg .qty-input,
.qty-stepper-lg input[type="number"] { width: 64px; font-size: 1.1rem; }

/* Out-of-stock block on product page */
.preorder-block {
    background: linear-gradient(135deg,#fff7ed 0%,#fffbf5 100%);
    border: 1.5px solid #fed7aa;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.preorder-block-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: rgba(234,88,12,.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    color: #ea580c;
    flex-shrink: 0;
}
.preorder-block-title {
    font-weight: 700;
    font-size: 0.97rem;
    color: #9a3412;
    margin-bottom: 0.2rem;
}
.preorder-block-text {
    font-size: 0.82rem;
    color: #c2410c;
    line-height: 1.5;
    margin: 0;
}

/* Out-of-stock overlay on product card */
.product-item .stock-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    letter-spacing: 0.03em;
    pointer-events: none;
}
.product-item .stock-badge.in-stock {
    background: rgba(22,163,74,.12);
    color: #15803d;
}
.product-item .stock-badge.out-of-stock {
    background: rgba(234,88,12,.12);
    color: #c2410c;
}
.product-item .img-wrap { position: relative; }
.product-item.is-out-of-stock .img-wrap img {
    opacity: 0.72;
    filter: grayscale(20%);
}

/* ── Qty Stepper Premium ───────────────────────────────────────────── */
.qty-stepper {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    padding: 2px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.qty-stepper button {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #fff;
    border-radius: 9px;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    font-size: 1rem;
}
.qty-stepper button:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}
.qty-input {
    width: 45px !important;
    height: 34px !important;
    border: none !important;
    background: transparent !important;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}
/* Hide arrows */
.qty-input::-webkit-inner-spin-button, 
.qty-input::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}

.qty-stepper-lg {
    padding: 3px;
    border-radius: 14px;
}
.qty-stepper-lg button {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
}
.qty-stepper-lg .qty-input {
    width: 55px !important;
    height: 44px !important;
    font-size: 1.15rem;
}

/* Responsive Refinements */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: white;
        padding: 1.5rem;
        border-radius: 20px;
        box-shadow: var(--shadow-lg);
        margin-top: 1rem;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        background: transparent !important;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
        outline: none;
    }

    .navbar > .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .navbar-brand {
        margin-left: 0;
    }

    /* Ensure collapse works */
    .collapse:not(.show) {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    .breadcrumb-wrapper {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .hero-section {
        text-align: center;
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        margin: 0 auto;
    }
    
    .hero-btns {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-btns .btn {
        margin: 0 !important;
    }
    
    .promo-section {
        padding: 2rem !important;
    }
}

/* ── Product page mobile ────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    .quick-specs-grid {
        grid-template-columns: 1fr 1fr;
    }
    .spec-label {
        width: 45%;
        min-width: 120px;
        font-size: 0.78rem;
    }
    .product-info-tiles {
        grid-template-columns: 1fr 1fr;
    }
    .compat-marks-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
    .compat-models-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .ptab-btn {
        padding: 0.7rem 1rem;
        font-size: 0.82rem;
    }
}
