/* TGVC Quoter — Verandas + Carports v7 */

/* --- BRAND VARIABLES --- */
    :root {
        --brand-navy: #143042;
        --brand-blue: #2b98ff;
        --brand-yellow: #fdca21;
        --bg-light: #f8f9fa;
        --border-color: #dee2e6;
        --success-green: #10b981;
    }

    #veranda-hub {
        max-width: 1200px;
        margin: 40px auto;
        font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
        color: var(--brand-navy);
    }

    /* --- BANNER --- */
    .hub-banner {
        background: #eef7ff;
        border: 1px solid #d0e7ff;
        color: var(--brand-navy);
        padding: 20px 25px;
        border-radius: 8px;
        margin-bottom: 25px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 18px;
        font-weight: 600;
        box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    }
    .hub-banner a { color: var(--brand-blue); font-weight: 800; text-decoration: none; font-size: 18px; }
    .hub-banner a:hover { text-decoration: underline; }

    /* --- TABS --- */
    .hub-tabs { display: flex; gap: 5px; margin-bottom: -2px; position: relative; z-index: 10; padding-left: 10px; }
    .tab-btn {
        padding: 14px 28px; cursor: pointer; background: #e9ecef; 
        border: 1px solid var(--border-color); border-bottom: none; border-radius: 8px 8px 0 0; 
        font-weight: bold; color: #6c757d; transition: all 0.2s ease; font-size: 15px; position: relative; top: 1px;
    }
    .tab-btn:hover { background: #dee2e6; }
    .tab-btn.active { background: #fff; color: var(--brand-navy); border-top: 3px solid var(--brand-blue); border-bottom: 1px solid #fff; z-index: 2; }

    /* --- LAYOUT --- */
    .tab-content { display: none; background: #fff; border: 1px solid var(--border-color); border-radius: 0 8px 8px 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); overflow: hidden; min-height: 600px; }
    .tab-content.active { display: block; }
    
    #qb-layout { display: grid; grid-template-columns: 300px 1fr; min-height: 600px; }
    .qb-sidebar { background: #143042; padding: 25px; border-right: 1px solid var(--border-color); color: #fff; }
    .qb-results { padding: 25px 30px; background: #fff; overflow-y: auto; }

    /* --- INPUTS --- */
    .field-group { margin-bottom: 20px; }
    .field-group label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.9); margin-bottom: 6px; font-weight: 700; }
    .qb-select { width: 100%; padding: 10px 12px; border: 2px solid #e9ecef; border-radius: 6px; font-size: 14px; color: var(--brand-navy); font-weight: 600; background: #fff; cursor: pointer; background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23143042%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); background-repeat: no-repeat; background-position: right 10px top 50%; background-size: 10px auto; appearance: none; }
    .qb-select:focus { border-color: var(--brand-blue); outline: none; }
    
    .checkbox-wrapper { display: flex; align-items: center; background: rgba(255,255,255,0.1); padding: 10px; border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; cursor: pointer; transition: 0.2s; color: #fff; }
    .checkbox-wrapper:hover { border-color: var(--brand-blue); background: rgba(255,255,255,0.15); }
    .checkbox-wrapper input { margin-right: 10px; width: 16px; height: 16px; accent-color: var(--brand-blue); }

    /* --- SORT TOOLBAR --- */
    .results-toolbar { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; }
    .sort-wrapper { display: flex; align-items: center; gap: 10px; margin-left: auto; }
    .sort-label { font-size: 12px; font-weight: bold; color: #999; text-transform: uppercase; }
    #input-sort-top { color: var(--brand-navy); border: 1px solid #dee2e6; width: auto; min-width: 180px; padding: 6px 30px 6px 10px; font-size: 13px; background-position: right 10px top 50%; }

    #results-grid { display: flex; flex-direction: column; gap: 15px; }

    /* --- MODEL CARD DESIGN --- */
    .model-card { 
        border: 1px solid var(--border-color); border-radius: 8px; padding: 25px; 
        display: grid; grid-template-columns: 200px 1fr 240px; gap: 25px; align-items: flex-start; 
        transition: transform 0.2s, box-shadow 0.2s; background: #fff; 
    }
    .model-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); border-color: var(--brand-blue); }

    .card-image { 
        width: 100%; height: 160px; background-color: #f0f2f4; border-radius: 6px; 
        background-size: contain; background-position: center; background-repeat: no-repeat; position: relative;
        box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
    }
    .origin-flag { position: absolute; top: 6px; left: 6px; width: 22px; height: 15px; border-radius: 2px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }

    .card-info { display: flex; flex-direction: column; justify-content: flex-start; }
    .card-header-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 8px; }
    .card-title { font-weight: 800; font-size: 22px; margin: 0; color: var(--brand-navy); line-height: 1.1; }
    .post-count-label { font-weight: 400; color: #666; font-size: 16px; margin-left: 5px; }
    
    .card-roof-badge { 
        font-size: 10px; text-transform: uppercase; color: #fff; padding: 3px 8px; 
        border-radius: 4px; font-weight: 800; letter-spacing: 0.5px; 
        display: inline-block;
    }
    .card-roof-badge.glass { background: var(--brand-blue); color: #fff; }
    .card-roof-badge.poly { background: var(--brand-yellow); color: var(--brand-navy); }

    .card-desc { font-size: 13px; color: #555; line-height: 1.4; margin-bottom: 12px; }

    .key-specs-list { display: flex; flex-direction: column; gap: 6px; margin-top: 5px; }
    .spec-item { font-size: 13px; color: #555; display: flex; align-items: center; gap: 8px; }
    .spec-item strong { color: var(--brand-navy); font-weight: 700; min-width: 80px; }

    .colour-swatches { display: flex; gap: 5px; margin-top: 12px; align-items: center; }
    .swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid #ccc; box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
    .ral-9016 { background: #ffffff; } 
    .ral-9001 { background: #fdf4e3; } 
    .ral-7016 { background: #383e42; } 
    .ral-9005 { background: #0e0e10; } 
    .ral-7024 { background: #474a51; } 

    .expand-trigger { color: var(--brand-blue); font-size: 12px; font-weight: bold; cursor: pointer; margin-top: 15px; background: none; border: none; padding: 0; text-decoration: underline; text-align: left; }
    .details-panel { display: none; margin-top: 15px; padding-top: 15px; border-top: 1px solid #f0f0f0; font-size: 13px; line-height: 1.5; color: #444; width: 100%; grid-column: 1 / -1; }
    .details-panel.open { display: block; animation: fadeIn 0.3s ease; }
    .details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    
    .detail-group-label { font-weight: 800; color: var(--brand-navy); font-size: 11px; text-transform: uppercase; margin-bottom: 6px; display: block; border-bottom: 1px solid #eee; padding-bottom: 4px; }
    .detail-row { margin-bottom: 8px; }
    .detail-list-item { display: block; margin-bottom: 3px; position: relative; padding-left: 12px; }
    .detail-list-item::before { content: "\2022"; position: absolute; left: 0; color: var(--brand-blue); font-weight: bold; }

    .card-actions { text-align: right; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; padding-left: 20px; border-left: 1px solid #f0f0f0; height: 100%; }
    .card-price { font-size: 34px; font-weight: 800; color: var(--brand-navy); margin-bottom: 2px; line-height: 1; }
    .card-vat { font-size: 11px; color: #999; margin-bottom: 15px; display: block; }
    .breakdown { font-size: 10px; color: #666; font-family: monospace; margin-bottom: 8px; font-weight: 600; color: var(--success-green); }

    .btn-callback { display: block; padding: 12px; background: var(--brand-blue); color: #fff; text-align: center; border-radius: 5px; text-decoration: none; font-weight: bold; font-size: 13px; transition: 0.2s; border: none; cursor: pointer; width: 100%; margin-bottom: 8px; }
    .btn-callback:hover { background: var(--brand-navy); }
    .btn-learn { display: block; padding: 10px; background: transparent; color: var(--brand-navy); text-align: center; border-radius: 5px; text-decoration: none; font-weight: bold; font-size: 12px; transition: 0.2s; border: 1px solid var(--border-color); width: 100%; }
    .btn-learn:hover { border-color: var(--brand-navy); background: #f8f9fa; }
    
    .compare-toggle { margin-top: 15px; display: flex; align-items: center; justify-content: flex-end; font-size: 12px; color: var(--brand-navy); font-weight: 600; cursor: pointer; }
    .compare-toggle input { margin-right: 8px; width: 16px; height: 16px; accent-color: var(--brand-blue); }

    .btn-group { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
    .no-results { text-align: center; padding: 50px; color: #888; border: 2px dashed #eee; border-radius: 12px; background: #fafafa; }

    /* --- COMPARISON TABLE (Desktop) --- */
    .matrix-wrapper { 
        position: relative; 
        overflow-x: auto; 
        margin: 25px 0; 
        border: 2px solid #143042;
        border-radius: 8px;
    }
    .matrix-table { 
        width: 100%; border-collapse: separate; border-spacing: 0; 
        min-width: 900px; font-family: 'Segoe UI', Helvetica, Arial, sans-serif; 
        text-align: center; font-size: 14px; 
    }

    /* Link reset */
    .matrix-table a { text-decoration: none; color: inherit; display: block; width: 100%; height: 100%; }
    .matrix-table thead th a:hover, .matrix-table .cat-model a:hover { background-color: #1c425a; color: #ffffff !important; }

    /* Sticky First Column */
    .matrix-table th:first-child, .matrix-table td:first-child { 
        position: sticky; left: 0; z-index: 10; 
        background-color: #f8f9fa;
        border-right: 1px solid #dee2e6;
        width: 240px; text-align: left; padding-left: 20px; font-weight: bold; color: #143042;
    }

    /* Navy Headers */
    .matrix-table thead th { 
        background-color: #143042 !important; color: white !important; 
        padding: 0; font-weight: bold; text-transform: uppercase; 
        border-bottom: 1px solid #fff; 
    }
    .matrix-table thead th a { padding: 20px 10px; color: #ffffff !important; }

    /* Image Cells */
    .image-cell { padding: 0 !important; line-height: 0; border-bottom: 1px solid #dee2e6; overflow: hidden; background: #f0f2f4; }
    .matrix-image { 
        width: 100%; height: 150px; object-fit: contain; display: block; background: #f0f2f4;
        transition: transform 0.4s ease; 
    }
    .matrix-image:hover { transform: scale(1.08); }

    /* Category Rows */
    .matrix-table .cat-row td { 
        background-color: #143042 !important; color: white !important; 
        padding: 0; font-weight: bold; border-top: 1px solid #fff; 
    }
    .matrix-table .cat-head-title { text-align: left !important; padding: 12px 10px 12px 20px !important; }
    .matrix-table .cat-model { font-size: 11px; text-transform: uppercase; color: #ced4da !important; letter-spacing: 1px; }
    .matrix-table .cat-model a { padding: 12px 10px; }

    /* Standard Cells */
    .matrix-table td { 
        padding: 15px 10px; border-bottom: 1px solid #dee2e6; 
        border-right: 1px solid #dee2e6; background-color: #fff; vertical-align: middle; 
    }
    .matrix-table tr:hover td:not(.cat-model):not(.cat-head-title):not(.image-cell) { background-color: #f1f4f6; }

    .tick { color: #143042; font-size: 1.5em; font-weight: bold; }
    .standard-label { color: #143042; font-weight: 900; font-size: 11px; }
    .swatch-large { display: inline-block; width: 24px; height: 24px; border-radius: 4px; margin-right: 10px; border: 1px solid #ced4da; vertical-align: middle; }
    .flag-icon-comp { display: inline-block; width: 32px; height: 20px; margin-left: 10px; vertical-align: middle; background-size: contain; background-repeat: no-repeat; background-position: center; border: 1px solid rgba(255,255,255,0.2); border-radius: 1px; }

    /* Swatch styles for comparison table */
    .swatch-comp { display: inline-block; width: 22px; height: 22px; border-radius: 4px; margin: 3px; border: 1px solid #ced4da; }
    .color-block { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin-bottom: 6px; }
    .line-item { font-size: 11px; color: #888; display: block; }

    /* --- MOBILE COMPARE CARDS --- */
    .mobile-compare { display: none; }
    .mobile-compare-hint { 
        display: none; text-align: center; padding: 12px 20px; 
        background: #eef7ff; border: 1px solid #d0e7ff; border-radius: 8px; 
        margin: 15px 20px; font-size: 13px; color: #143042; font-weight: 600; 
    }
    .mobile-compare-hint span { font-size: 18px; margin-right: 6px; }

    .compare-cards-scroll { 
        display: flex; overflow-x: auto; gap: 15px; padding: 15px 20px 25px; 
        scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; 
    }
    .compare-cards-scroll::-webkit-scrollbar { height: 6px; }
    .compare-cards-scroll::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 3px; }
    .compare-cards-scroll::-webkit-scrollbar-thumb { background: #143042; border-radius: 3px; }

    .compare-card { 
        flex: 0 0 280px; scroll-snap-align: start; 
        border: 2px solid #143042; border-radius: 8px; overflow: hidden; 
        background: #fff; 
    }
    .compare-card-header { 
        background: #143042; color: #fff; padding: 14px 16px; 
        font-weight: 800; font-size: 16px; text-transform: uppercase; 
        text-align: center; letter-spacing: 1px; 
    }
    .compare-card-header a { color: #fff; text-decoration: none; }
    .compare-card-image { width: 100%; height: 160px; object-fit: contain; display: block; background: #f0f2f4; }
    .compare-card-desc { 
        padding: 12px 16px; font-size: 12px; color: #555; line-height: 1.5; 
        border-bottom: 1px solid #dee2e6; background: #f8f9fa; 
    }
    .compare-card-specs { padding: 0; }
    .compare-card-section { 
        background: #143042; color: #fff; padding: 8px 16px; 
        font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; 
    }
    .compare-card-row { 
        display: flex; justify-content: space-between; align-items: center;
        padding: 10px 16px; border-bottom: 1px solid #f0f0f0; font-size: 13px; 
    }
    .compare-card-row:last-child { border-bottom: none; }
    .compare-card-label { color: #888; font-weight: 600; flex: 0 0 auto; margin-right: 10px; }
    .compare-card-value { color: #143042; font-weight: 700; text-align: right; flex: 1; }
    .compare-card-swatches { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }

    .scroll-dots { display: flex; justify-content: center; gap: 8px; padding: 10px 0 5px; }
    .scroll-dot { width: 8px; height: 8px; border-radius: 50%; background: #dee2e6; transition: 0.3s; }
    .scroll-dot.active { background: #143042; transform: scale(1.3); }

    @media (max-width: 900px) {
        .mobile-compare-hint { display: block; }
    }

    /* --- MOBILE CARD FIXED-HEIGHT SECTIONS --- */
    .cc-fixed-section { padding: 0; }
    .cc-key-specs .compare-card-row { height: 42px; display: flex; align-items: center; }
    .cc-colours { padding: 8px 16px; }
    .cc-colour-row { 
        display: flex; align-items: center; gap: 8px; 
        height: 32px; border-bottom: 1px solid #f5f5f5; 
    }
    .cc-colour-row:last-child { border-bottom: none; }
    .cc-colour-name { flex: 1; font-size: 12px; color: #666; }
    .cc-colour-tick { font-size: 16px; font-weight: bold; color: #143042; width: 24px; text-align: center; }
    
    .cc-tick-row { 
        display: flex; align-items: center; justify-content: space-between; 
        height: 38px; padding: 0 16px; border-bottom: 1px solid #f5f5f5; 
    }
    .cc-tick-row:last-child { border-bottom: none; }
    .cc-tick-label { font-size: 12px; color: #555; flex: 1; }
    .cc-tick-mark { font-size: 16px; font-weight: bold; color: #143042; width: 24px; text-align: center; }

    @keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

    @media (max-width: 900px) { 
        #qb-layout { grid-template-columns: 1fr; height: auto; } 
        .qb-results { overflow-y: visible; height: auto; }
        .qb-sidebar { overflow-y: visible; }
        .model-card { grid-template-columns: 1fr; gap: 15px; }
        .card-image { height: 180px; }
        .card-actions { border-left: none; padding-left: 0; border-top: 1px solid #f0f0f0; padding-top: 15px; align-items: center; width: 100%; text-align: center; }
        .results-toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }
        .sort-wrapper { margin-left: 0; width: 100%; justify-content: space-between; }
        .details-grid { grid-template-columns: 1fr; gap: 10px; }
    }

    /* --- STATUS INDICATOR --- */
    .status-indicator { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
    .status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
    .status-dot.open { background: #10b981; box-shadow: 0 0 6px rgba(16,185,129,0.5); animation: pulse 2s infinite; }
    .status-dot.closed { background: #ef4444; }
    @keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.5; } }

    /* --- PRODUCT TABS (Verandas / Carports) --- */
    .product-tabs { display: flex; gap: 0; margin-bottom: 20px; }
    .product-tab {
        padding: 12px 30px; cursor: pointer; background: #e9ecef;
        border: 2px solid var(--border-color); border-bottom: none;
        font-weight: 800; color: #6c757d; transition: all 0.2s ease; font-size: 16px;
        text-transform: uppercase; letter-spacing: 1px;
    }
    .product-tab:first-child { border-radius: 8px 0 0 0; }
    .product-tab:last-child { border-radius: 0 8px 0 0; }
    .product-tab.active { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
    .product-tab:hover:not(.active) { background: #dee2e6; }
    .product-section { display: none; }
    .product-section.active { display: block; }

    /* --- BANNER LAYOUT --- */
    .hub-banner { flex-wrap: wrap; gap: 10px; }
    .banner-left { flex: 1; min-width: 250px; display: flex; flex-direction: column; gap: 4px; }
    .banner-right { display: flex; align-items: center; gap: 15px; }
    .btn-call-dynamic {
        display: inline-block; padding: 10px 20px; border-radius: 6px; font-weight: 800;
        font-size: 14px; text-decoration: none; transition: 0.2s; white-space: nowrap;
    }
    .btn-call-dynamic.is-open { background: #10b981; color: #fff; }
    .btn-call-dynamic.is-open:hover { background: #059669; }
    .btn-call-dynamic.is-closed { background: var(--brand-blue); color: #fff; }
    .btn-call-dynamic.is-closed:hover { background: var(--brand-navy); }

    /* --- CARPORT LAYOUT --- */
    #qb-layout-carport { display: grid; grid-template-columns: 300px 1fr; min-height: 600px; }

    @media (max-width: 900px) {
        .product-tabs { flex-direction: row; }
        .product-tab { flex: 1; text-align: center; font-size: 13px; padding: 10px 15px; }
        #qb-layout-carport { grid-template-columns: 1fr; height: auto; }
    }

    /* ============================================================
       NEW COMPARE TAB DESIGN (cmpr- prefix to avoid clashes)
       ============================================================ */
    .cmpr-wrap {
        background: #fff;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 1px 2px rgba(20,48,66,0.04), 0 8px 40px rgba(20,48,66,0.08);
        font-family: 'DM Sans', -apple-system, sans-serif;
    }

    /* Intro */
    .cmpr-intro {
        background: linear-gradient(180deg, var(--brand-navy) 0%, #1e4360 100%);
        padding: 36px 32px 32px;
        text-align: center;
        color: #fff;
        position: relative;
        overflow: hidden;
    }
    .cmpr-intro::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse at 50% 0%, rgba(253,202,33,0.08) 0%, transparent 70%);
        pointer-events: none;
    }
    .cmpr-eyebrow {
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 2px;
        text-transform: uppercase;
        color: var(--brand-yellow);
        margin-bottom: 12px;
        position: relative;
    }
    .cmpr-intro h2 {
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-size: clamp(22px, 3vw, 32px);
        font-weight: 800;
        line-height: 1.2;
        margin: 0 0 8px;
        color: #fff;
        position: relative;
    }
    .cmpr-intro p {
        font-size: 14px;
        color: rgba(255,255,255,0.7);
        max-width: 540px;
        margin: 0 auto;
        position: relative;
    }

    /* Sticky model strip */
    .cmpr-strip-outer {
        position: sticky;
        top: 0;
        z-index: 20;
        background: #fff;
        border-bottom: 1px solid #e0e4e8;
        box-shadow: 0 2px 12px rgba(20,48,66,0.04);
    }
    .cmpr-strip {
        display: grid;
        gap: 0;
    }
    .cmpr-strip[data-cols="6"] { grid-template-columns: 170px repeat(6, 1fr); }
    .cmpr-strip[data-cols="2"] { grid-template-columns: 170px 1fr 1fr; }
    .cmpr-strip-label {
        background: #f5f3ef;
        border-right: 1px solid #e0e4e8;
        display: flex;
        align-items: center;
        padding: 18px 18px;
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-size: 12px;
        font-weight: 700;
        color: #6c757d;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    .cmpr-model-header {
        padding: 18px 12px 16px;
        border-right: 1px solid #e0e4e8;
        text-align: center;
        background: #fff;
    }
    .cmpr-model-header:last-child { border-right: none; }
    .cmpr-model-img-wrap {
        width: 100%;
        aspect-ratio: 16 / 11;
        border-radius: 8px;
        overflow: hidden;
        margin-bottom: 12px;
        background: #f5f3ef;
        position: relative;
    }
    .cmpr-model-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .cmpr-model-flag {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 24px;
        height: 18px;
        border-radius: 3px;
        background-size: cover;
        background-position: center;
        box-shadow: 0 2px 6px rgba(0,0,0,0.2);
        border: 1px solid rgba(255,255,255,0.3);
    }
    .cmpr-model-tag {
        display: inline-block;
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: var(--brand-yellow);
        background: rgba(253,202,33,0.1);
        padding: 3px 8px;
        border-radius: 10px;
        margin-bottom: 6px;
    }
    .cmpr-model-name {
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-size: 16px;
        font-weight: 800;
        color: var(--brand-navy);
        margin-bottom: 2px;
        letter-spacing: -0.3px;
    }
    .cmpr-model-name a { color: inherit; text-decoration: none; }
    .cmpr-model-name a:hover { color: var(--brand-blue); }
    .cmpr-model-origin { font-size: 11px; color: #6c757d; font-weight: 500; }

    /* Spec sections */
    .cmpr-section { border-bottom: 1px solid #e0e4e8; }
    .cmpr-section:last-child { border-bottom: none; }
    .cmpr-section-head {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 24px;
        background: #f5f3ef;
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-size: 12px;
        font-weight: 700;
        color: var(--brand-navy);
        text-transform: uppercase;
        letter-spacing: 1.2px;
        border-bottom: 1px solid #e0e4e8;
    }
    .cmpr-section-head svg {
        width: 16px;
        height: 16px;
        fill: none;
        stroke: var(--brand-blue);
        stroke-width: 2;
        flex-shrink: 0;
    }
    .cmpr-row {
        display: grid;
        gap: 0;
        border-bottom: 1px solid #e0e4e8;
        transition: background 0.15s;
    }
    .cmpr-row[data-cols="6"] { grid-template-columns: 170px repeat(6, 1fr); }
    .cmpr-row[data-cols="2"] { grid-template-columns: 170px 1fr 1fr; }
    .cmpr-row:last-child { border-bottom: none; }
    .cmpr-row:hover { background: rgba(1,133,255,0.03); }
    .cmpr-label {
        padding: 13px 18px;
        background: #f5f3ef;
        border-right: 1px solid #e0e4e8;
        font-size: 12.5px;
        font-weight: 600;
        color: #6c757d;
        display: flex;
        align-items: center;
    }
    .cmpr-cell {
        padding: 13px 8px;
        border-right: 1px solid #e0e4e8;
        font-size: 13px;
        font-weight: 600;
        color: #1a1a2e;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1.4;
    }
    .cmpr-cell:last-child { border-right: none; }
    .cmpr-cell.cmpr-highlight {
        background: linear-gradient(180deg, rgba(253,202,33,0.1) 0%, transparent 100%);
    }
    .cmpr-tick-yes, .cmpr-tick-no {
        display: inline-flex;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 13px;
    }
    .cmpr-tick-yes { background: rgba(42,157,92,0.12); color: #2a9d5c; }
    .cmpr-tick-no { background: transparent; color: #d0d5da; font-size: 16px; }

    /* Colour swatch strip */
    .cmpr-swatches {
        display: flex;
        gap: 5px;
        justify-content: center;
        flex-wrap: wrap;
        padding: 4px 0;
    }
    .cmpr-swatch {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        border: 2px solid #fff;
        box-shadow: 0 0 0 1px #e0e4e8;
        position: relative;
        cursor: help;
    }
    .cmpr-swatch.cmpr-missing { opacity: 0.18; }
    .cmpr-swatch.cmpr-missing::after {
        content: '';
        position: absolute;
        top: 50%;
        left: -2px;
        right: -2px;
        height: 2px;
        background: #6c757d;
        transform: rotate(-45deg);
    }

    .cmpr-bespoke {
        padding: 12px 24px;
        background: rgba(253,202,33,0.08);
        border-top: 1px solid rgba(253,202,33,0.2);
        border-bottom: 1px solid rgba(253,202,33,0.2);
        font-size: 12px;
        color: var(--brand-navy);
        font-style: italic;
        text-align: center;
    }
    .cmpr-bespoke strong { color: var(--brand-navy); font-style: normal; }

    /* Footer CTA */
    .cmpr-footer {
        padding: 26px 32px 30px;
        background: #f5f3ef;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 16px;
    }
    .cmpr-footer-text { font-size: 14px; color: #6c757d; max-width: 420px; }
    .cmpr-footer-text strong { color: var(--brand-navy); }
    .cmpr-cta-group { display: flex; gap: 10px; flex-wrap: wrap; }
    .cmpr-cta {
        font-family: 'DM Sans', sans-serif;
        font-size: 14px;
        font-weight: 700;
        padding: 12px 22px;
        border-radius: 8px;
        text-decoration: none;
        transition: all 0.2s;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
    }
    .cmpr-cta-primary { background: var(--brand-blue); color: #fff; }
    .cmpr-cta-primary:hover { background: #2b98ff; color: #fff !important; }
    .cmpr-cta-secondary { background: transparent; color: var(--brand-navy); border: 2px solid var(--brand-navy); }
    .cmpr-cta-secondary:hover { background: var(--brand-navy); color: #fff !important; }

    /* Mobile selector */
    .cmpr-mob-selector {
        display: none;
        background: #fff;
        border-bottom: 1px solid #e0e4e8;
        padding: 14px 16px;
    }
    .cmpr-mob-selector-label {
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-size: 10px;
        font-weight: 700;
        color: #6c757d;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 8px;
    }
    .cmpr-mob-chips {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .cmpr-mob-chips::-webkit-scrollbar { display: none; }
    .cmpr-mob-chip {
        flex-shrink: 0;
        font-family: 'DM Sans', sans-serif;
        font-size: 12px;
        font-weight: 600;
        padding: 8px 14px;
        border-radius: 100px;
        border: 1.5px solid #e0e4e8;
        background: #fff;
        color: #6c757d;
        cursor: pointer;
        white-space: nowrap;
        transition: all 0.15s;
    }
    .cmpr-mob-chip.cmpr-active {
        background: var(--brand-navy);
        color: #fff;
        border-color: var(--brand-navy);
    }

    /* ============================================================
       MOBILE LAYOUT — collapse grid into stacked cells
       ============================================================ */
    @media (max-width: 1024px) {
        .cmpr-strip-outer { display: none; }
        .cmpr-mob-selector {
            display: block;
            position: sticky;
            top: 0;
            z-index: 20;
            box-shadow: 0 2px 8px rgba(20,48,66,0.04);
        }
        .cmpr-section { border-bottom: none; }
        .cmpr-section-head { position: sticky; top: 71px; z-index: 10; }
        .cmpr-row {
            display: block !important;
            border-bottom: 1px solid #e0e4e8;
            padding: 8px 0 12px;
        }
        .cmpr-row:hover { background: transparent; }
        .cmpr-label {
            background: transparent;
            border: none;
            padding: 12px 20px 4px;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: #6c757d;
        }
        .cmpr-cell {
            border: none;
            padding: 5px 20px 5px 95px;
            text-align: left;
            justify-content: flex-start;
            font-size: 14px;
            display: none;
            position: relative;
        }
        .cmpr-cell.cmpr-show { display: flex; }
        .cmpr-cell::before {
            content: attr(data-model);
            position: absolute;
            left: 20px;
            font-size: 11px;
            font-weight: 700;
            color: var(--brand-navy);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            display: inline-block;
            width: 70px;
        }
        .cmpr-cell.cmpr-highlight { background: transparent; }
        .cmpr-swatches { justify-content: flex-start; }
        .cmpr-footer {
            padding: 22px 20px 26px;
            flex-direction: column;
            align-items: stretch;
        }
        .cmpr-footer-text { max-width: none; text-align: center; }
        .cmpr-cta-group { width: 100%; justify-content: center; }
        .cmpr-cta { flex: 1; justify-content: center; min-width: 140px; }
        .cmpr-intro { padding: 28px 20px 24px; }
    }

    /* Hide the legacy mobile-compare cards section since the new design
       handles mobile internally */
    .mobile-compare { display: none !important; }
    .matrix-wrapper { background: transparent; padding: 0; overflow: visible; }
