/* ==========================================================================
   CNCBUY.NET - CNC Models & Brands Directory Stylesheet
   Modern, Responsive, Industrial Machinery UI
   ========================================================================== */

:root {
    --cnc-primary: #0056b3;
    --cnc-primary-dark: #003d82;
    --cnc-accent: #ff6600;
    --cnc-dark: #1e293b;
    --cnc-gray-bg: #f8fafc;
    --cnc-border: #e2e8f0;
    --cnc-card-shadow: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -1px rgba(0,0,0,0.04);
    --cnc-hover-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

.cnc-page-wrapper {
    background-color: var(--cnc-gray-bg);
    padding: 30px 0 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #334155;
}

/* Universal Center Alignment Protection */
.container,
.setmargin,
.cnc-container,
.cnc-main-container,
.gcode-container {
    max-width: 1240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Header & Breadcrumb */
.cnc-hero-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 32px 28px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.cnc-hero-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 10px;
    color: #ffffff;
}
.cnc-hero-header p {
    font-size: 16px;
    color: #94a3b8;
    margin: 0;
    max-width: 800px;
    line-height: 1.6;
}
.cnc-breadcrumb {
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 14px;
    color: #64748b;
}
.cnc-breadcrumb a {
    color: var(--cnc-primary);
    text-decoration: none;
}
.cnc-breadcrumb a:hover {
    text-decoration: underline;
}

/* Filter Bar */
.cnc-filter-bar {
    background: #ffffff;
    border: 1px solid var(--cnc-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--cnc-card-shadow);
}
.cnc-filter-bar .form-group {
    margin-bottom: 0;
}
.cnc-filter-bar label {
    font-weight: 600;
    color: #475569;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 6px;
}
.cnc-filter-bar select,
.cnc-filter-bar input {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    width: 100%;
    color: #1e293b;
    background-color: #ffffff;
    transition: all 0.2s;
}
.cnc-filter-bar select:focus,
.cnc-filter-bar input:focus {
    border-color: var(--cnc-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,86,179,0.15);
}

/* Machine Grid & Cards */
.cnc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}
.cnc-card {
    background: #ffffff;
    border: 1px solid var(--cnc-border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--cnc-card-shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.cnc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--cnc-hover-shadow);
    border-color: #cbd5e1;
}
.cnc-card-img-wrap {
    height: 220px;
    background-color: #f1f5f9;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f1f5f9;
}
.cnc-card-img-wrap img {
    max-height: 190px;
    max-width: 90%;
    object-fit: contain;
    transition: transform 0.3s;
}
.cnc-card:hover .cnc-card-img-wrap img {
    transform: scale(1.04);
}
.cnc-badge-mtconnect {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #059669;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.cnc-badge-type {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}
.cnc-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.cnc-card-brand {
    font-size: 13px;
    font-weight: 700;
    color: var(--cnc-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.cnc-card-title {
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #0f172a;
    line-height: 1.3;
}
.cnc-card-title a {
    color: inherit;
    text-decoration: none;
}
.cnc-card-title a:hover {
    color: var(--cnc-primary);
}

/* Specs Mini Matrix */
.cnc-specs-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 16px;
    font-size: 12px;
}
.cnc-spec-item {
    display: flex;
    flex-direction: column;
}
.cnc-spec-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}
.cnc-spec-val {
    color: #1e293b;
    font-weight: 700;
}
.cnc-card-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}
.cnc-btn-view {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--cnc-primary);
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}
.cnc-btn-view:hover {
    background: var(--cnc-primary-dark);
    color: #ffffff;
    text-decoration: none;
}

/* Brand Grid */
.cnc-brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.cnc-brand-card {
    background: #ffffff;
    border: 1px solid var(--cnc-border);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    box-shadow: var(--cnc-card-shadow);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cnc-brand-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--cnc-hover-shadow);
    border-color: var(--cnc-primary);
    color: inherit;
    text-decoration: none;
}
.cnc-brand-logo {
    height: 70px;
    width: 160px;
    object-fit: contain;
    margin-bottom: 15px;
}
.cnc-brand-name {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}
.cnc-brand-country {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* Detail Page Specifics */
.cnc-detail-hero {
    background: #ffffff;
    border: 1px solid var(--cnc-border);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--cnc-card-shadow);
}
.cnc-detail-gallery img {
    width: 100%;
    max-height: 440px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e2e8f0;
}
.cnc-quick-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}
.cnc-quick-badge {
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}
.cnc-quick-badge.primary {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}
.cnc-quick-badge.success {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

/* MachineSchema Technical Specs Table */
.cnc-specs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border: 1px solid var(--cnc-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}
.cnc-specs-table th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
    padding: 14px 18px;
    border-bottom: 2px solid var(--cnc-border);
    font-size: 15px;
    text-align: left;
}
.cnc-specs-table td {
    padding: 12px 18px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}
.cnc-specs-table tr:last-child td {
    border-bottom: none;
}
.cnc-specs-table tr:nth-child(even) td {
    background-color: #fafafa;
}
.cnc-specs-table .spec-param {
    font-weight: 600;
    color: #475569;
    width: 40%;
}
.cnc-specs-table .spec-val {
    font-weight: 700;
    color: #0f172a;
}

/* AI Direct-Answer Citability Box (GEO) */
.cnc-geo-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #e6fcf5 100%);
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}
.cnc-geo-box-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #166534;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.cnc-geo-box p {
    font-size: 15px;
    line-height: 1.6;
    color: #14532d;
    margin: 0;
}

/* FAQ Accordion */
.cnc-faq-card {
    background: #ffffff;
    border: 1px solid var(--cnc-border);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}
.cnc-faq-question {
    padding: 16px 20px;
    font-weight: 700;
    font-size: 16px;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    transition: background 0.2s;
}
.cnc-faq-question:hover {
    background: #f8fafc;
}
.cnc-faq-answer {
    padding: 0 20px 18px;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
}


/* ==========================================================================
   Responsive Enhancements & High-Tech Filter Console Layout
   ========================================================================== */
.cnc-hero-console {
    background: linear-gradient(135deg, #0b1329 0%, #172554 50%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px 32px 28px;
    margin-bottom: 28px;
    box-shadow: 0 10px 25px -5px rgba(2, 6, 23, 0.4), 0 8px 10px -6px rgba(2, 6, 23, 0.2);
    position: relative;
    overflow: hidden;
}

.cnc-hero-console::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.cnc-console-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 22px;
    position: relative;
    z-index: 2;
}

.cnc-console-title-group h1 {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
    line-height: 1.25;
}

.cnc-console-title-group p {
    color: #94a3b8;
    font-size: 14.5px;
    margin: 0;
    line-height: 1.55;
    max-width: 820px;
}

.cnc-console-badge {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.cnc-filter-toolbar,
.cnc-filter-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
}

.cnc-filter-form {
    margin: 0;
}

.cnc-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.cnc-filter-col {
    display: flex;
    flex: 1 1 180px;
    min-width: 170px;
}

.cnc-filter-search {
    flex: 2 1 280px;
    min-width: 220px;
}

.cnc-filter-select {
    flex: 1 1 180px;
    min-width: 170px;
}

.cnc-input-icon-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.cnc-field-icon {
    position: absolute;
    left: 14px;
    color: #64748b;
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
}

.cnc-input-with-icon,
.cnc-input {
    width: 100%;
    height: 46px;
    padding: 0 36px 0 42px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    background: #f8fafc;
    font-weight: 500;
    transition: all 0.2s ease;
    box-sizing: border-box;
    outline: none;
}

.cnc-input:focus {
    background: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.cnc-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.cnc-clear-btn {
    position: absolute;
    right: 12px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.cnc-clear-btn:hover {
    color: #e11d48;
}

.cnc-select {
    width: 100%;
    height: 46px;
    padding: 0 36px 0 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #f8fafc;
    font-weight: 600;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    outline: none;
}

.cnc-select:hover {
    background-color: #ffffff;
    border-color: #94a3b8;
}

.cnc-select:focus {
    background-color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.cnc-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 0 0 auto;
}

.cnc-btn-filter {
    height: 46px;
    padding: 0 24px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cnc-btn-filter:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.45);
    transform: translateY(-1px);
}

.cnc-btn-reset {
    height: 46px;
    padding: 0 16px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    font-size: 13.5px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    white-space: nowrap;
}

.cnc-btn-reset:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
    text-decoration: none;
}

/* Active Filter Chips */
.cnc-active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
}

.cnc-chip-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cnc-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #bae6fd;
}

.cnc-filter-chip strong {
    font-weight: 700;
    color: #0284c7;
}

.cnc-filter-chip a {
    color: #0369a1;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    margin-left: 2px;
    line-height: 1;
}

.cnc-filter-chip a:hover {
    color: #dc2626;
}

.cnc-chip-clear-all {
    font-size: 12px;
    color: #ef4444;
    font-weight: 600;
    text-decoration: none;
    margin-left: 6px;
}

.cnc-chip-clear-all:hover {
    text-decoration: underline;
}

/* Mobile Responsiveness Breakpoints */
@media (max-width: 768px) {
    .cnc-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .cnc-filter-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .cnc-filter-col, .cnc-filter-search, .cnc-filter-select, .cnc-filter-actions {
        width: 100% !important;
        flex: 1 1 100% !important;
    }
    .cnc-btn-filter, .cnc-btn-reset {
        flex: 1;
        width: 100% !important;
        justify-content: center !important;
    }
    .cnc-detail-hero .row {
        display: flex;
        flex-direction: column;
    }
    .cnc-detail-gallery img {
        max-height: 260px !important;
    }
    .cnc-specs-table {
        font-size: 13px !important;
    }
    .cnc-specs-table th, .cnc-specs-table td {
        padding: 8px 10px !important;
    }
    .cnc-brand-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

@media (max-width: 480px) {
    .cnc-brand-grid {
        grid-template-columns: 1fr !important;
    }
    .cnc-page-wrapper {
        padding: 15px 0 40px !important;
    }
}

/* ==========================================================================
   CNC Blog Directory & Single Post Styles
   ========================================================================== */
.cnc-blog-wrapper {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px 40px;
    box-sizing: border-box;
}
.cnc-blog-breadcrumbs, .cnc-post-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    margin: 20px 0 16px;
    font-weight: 500;
}
.cnc-blog-breadcrumbs a, .cnc-post-breadcrumbs a {
    color: #0284c7;
    text-decoration: none;
    transition: color 0.15s ease;
}
.cnc-blog-breadcrumbs a:hover, .cnc-post-breadcrumbs a:hover {
    color: #0369a1;
    text-decoration: underline;
}
.cnc-blog-breadcrumbs .sep, .cnc-post-breadcrumbs .sep {
    color: #cbd5e1;
}
.cnc-blog-breadcrumbs .current, .cnc-post-breadcrumbs .current {
    color: #1e293b;
    font-weight: 600;
}
.cnc-blog-hero {
    background: linear-gradient(135deg, #0b1528 0%, #0f2038 50%, #152a4a 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 40px 32px;
    color: #ffffff;
    margin-bottom: 32px;
    box-shadow: 0 10px 25px -5px rgba(11, 21, 40, 0.4);
    position: relative;
    overflow: hidden;
}
.cnc-blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.35);
    color: #38bdf8;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.cnc-blog-hero-title {
    font-size: 32px;
    line-height: 1.25;
    font-weight: 800;
    margin: 0 0 12px;
    color: #f8fafc;
    letter-spacing: -0.5px;
}
.cnc-blog-hero-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #94a3b8;
    max-width: 820px;
    margin: 0;
}
.cnc-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}
.cnc-bcard {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    text-decoration: none;
}
.cnc-bcard:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.12);
    border-color: #cbd5e1;
}
.cnc-bcard-media {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #0f172a;
    overflow: hidden;
}
.cnc-bcard-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.cnc-bcard:hover .cnc-bcard-media img {
    transform: scale(1.05);
}
.cnc-bcard-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    color: #38bdf8;
    font-size: 10.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
}
.cnc-bcard-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.cnc-bcard-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
}
.cnc-bcard-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cnc-bcard:hover .cnc-bcard-title {
    color: #0284c7;
}
.cnc-bcard-desc {
    font-size: 13.5px;
    line-height: 1.6;
    color: #475569;
    margin: 0 0 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cnc-bcard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}
.cnc-bcard-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0284c7;
    font-size: 13px;
    font-weight: 700;
}
.cnc-bcard:hover .cnc-bcard-btn {
    gap: 10px;
    color: #0369a1;
}
.cnc-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0 20px;
    flex-wrap: wrap;
}
.cnc-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #334155;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    transition: all 0.15s ease;
}
.cnc-page-link:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}
.cnc-page-link.active {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
}
.cnc-post-wrapper {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 0 16px 50px;
    box-sizing: border-box;
}
.cnc-post-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.cnc-post-title {
    font-size: 34px;
    line-height: 1.3;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 16px;
    letter-spacing: -0.5px;
    text-align: left !important;
}
.cnc-post-metabar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13.5px;
    color: #64748b;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}
.cnc-post-featured {
    width: 100%;
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.1);
    border: 1px solid #e2e8f0;
}
.cnc-post-featured img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
}
.cnc-article-body {
    font-size: 17px;
    line-height: 1.8;
    color: #334155;
    text-align: left !important;
}
.cnc-article-body p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #334155;
    text-align: left !important;
}
.cnc-article-body h2 {
    font-size: 24px;
    line-height: 1.35;
    font-weight: 700;
    color: #0f172a;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    text-align: left !important;
}
.cnc-article-body h3 {
    font-size: 20px;
    line-height: 1.4;
    font-weight: 600;
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    text-align: left !important;
}
.cnc-article-body ul, .cnc-article-body ol {
    margin: 0 0 1.5rem 1.5rem;
    padding: 0;
    color: #334155;
    line-height: 1.75;
    text-align: left !important;
}
.cnc-article-body li {
    margin-bottom: 0.5rem;
    text-align: left !important;
}
.cnc-article-body img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin: 24px auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}
.cnc-article-body blockquote {
    border-left: 4px solid #0284c7;
    background: #f8fafc;
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #0369a1;
    text-align: left !important;
}
.cnc-article-body a {
    color: #0284c7;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cnc-article-body a:hover {
    color: #0369a1;
}
.cnc-post-cta {
    background: linear-gradient(135deg, #0b1528 0%, #152a4a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 28px 24px;
    color: #ffffff;
    margin: 40px 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.cnc-post-cta-text h4 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #f8fafc;
}
.cnc-post-cta-text p {
    margin: 0;
    font-size: 14px;
    color: #94a3b8;
}
.cnc-post-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0284c7;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 22px;
    border-radius: 8px;
    text-decoration: none !important;
}
.cnc-post-cta-btn:hover {
    background: #0369a1;
}

/* ==========================================================================
   CNC Machine Comparison Engine Styles
   ========================================================================== */
.cnc-btn-compare-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.cnc-btn-compare-toggle:hover {
    background: #f0f9ff;
    border-color: #0284c7;
    color: #0284c7;
}
.cnc-btn-compare-toggle.added {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
}

/* Floating Comparison Dock (Fixed Tray) */
.cnc-compare-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.3);
    padding: 12px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: cncSlideUp 0.25s ease-out;
}
@keyframes cncSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.cnc-cdock-container {
    width: 100%;
    max-width: 1280px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.cnc-cdock-header {
    display: flex;
    align-items: center;
    gap: 14px;
}
.cnc-cdock-counter {
    font-size: 13.5px;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cnc-cdock-counter i {
    color: #38bdf8;
}
.cnc-cdock-clear {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}
.cnc-cdock-clear:hover {
    color: #f87171;
}
.cnc-cdock-slots {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    overflow-x: auto;
    padding: 2px 0;
}
.cnc-cdock-slot {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 4px 10px 4px 4px;
    min-width: 140px;
    max-width: 190px;
    position: relative;
    flex-shrink: 0;
}
.cnc-cdock-slot.empty {
    border: 1px dashed rgba(255, 255, 255, 0.2);
    background: transparent;
    justify-content: center;
    color: #64748b;
    font-size: 11.5px;
    height: 38px;
    padding: 0 10px;
}
.cnc-cdock-slot img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
    flex-shrink: 0;
}
.cnc-cdock-title {
    font-size: 12px;
    font-weight: 600;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
}
.cnc-cdock-remove {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.cnc-cdock-remove:hover {
    color: #f87171;
}
.cnc-cdock-action {
    display: flex;
    align-items: center;
}
.cnc-cdock-btn-compare {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0284c7;
    color: #ffffff !important;
    font-size: 13.5px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.15s ease;
}
.cnc-cdock-btn-compare:hover {
    background: #0369a1;
    transform: translateY(-1px);
}
.cnc-cdock-hint {
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
}
@media (max-width: 768px) {
    .cnc-cdock-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .cnc-cdock-slots {
        width: 100%;
    }
    .cnc-cdock-btn-compare {
        width: 100%;
        justify-content: center;
    }
}
