/* ═══════════════════════════════════════════════════════════════
   Colour Bar Page  –  colour-bar.css
   All styles external. No inline / internal CSS.
   ═══════════════════════════════════════════════════════════════ */

/* ── Page Wrapper ──────────────────────────────────────────────── */
.cb-page {
    background: #f4f5f9;
    min-height: 90vh;
}

/* ══════════════════════════════════════════════════════════════
   HERO  –  Colour Bar specific (replaces shared page-hero)
   ══════════════════════════════════════════════════════════════ */
.cb-hero {
    position: relative;
    background-color: #00ADF1;
    padding: 0;
    overflow: hidden;
}

/* Diagonal stripe pattern - matches contact page hero */
.cb-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.04) 0px,
        rgba(255,255,255,0.04) 2px,
        transparent 2px,
        transparent 18px
    );
    pointer-events: none;
}

/* Depth gradient overlay */
.cb-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        rgba(0, 80, 120, 0.35) 0%,
        rgba(0, 100, 150, 0.15) 50%,
        transparent 100%
    );
    pointer-events: none;
}

/* Brand cyan left-edge accent bar – removed (bg is now cyan) */
.cb-hero-accent-bar { display: none; }

.cb-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 40px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

/* ── Hero Left: Text ───────────────────────────────────────────── */
.cb-hero-left {
    flex: 1;
    min-width: 0;
}

.cb-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 30px;
    padding: 5px 14px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffffff;
    margin-bottom: 12px;
}

.cb-hero-title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.12;
    margin-bottom: 10px;
}

.cb-hero-title span {
    background: linear-gradient(90deg, #FFDE2D 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cb-hero-subtitle {
    font-size: 0.92rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 480px;
}

.cb-hero-stats {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(0,0,0,0.2);
    overflow: hidden;
    width: fit-content;
}

.cb-hero-stat {
    text-align: center;
    padding: 12px 24px;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.cb-hero-stat:last-child { border-right: none; }

.cb-hero-stat-number {
    font-size: 1.6rem;
    font-weight: 900;
    color: #FFDE2D;
    line-height: 1;
    margin-bottom: 3px;
}

.cb-hero-stat-label {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
}

/* ── Hero Right: Colour Swatches Panel ─────────────────────────── */
.cb-hero-right {
    flex-shrink: 0;
    background: rgba(0,0,0,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    backdrop-filter: blur(4px);
}

.cb-hero-right-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 4px;
    text-align: center;
}

.cb-hero-palette-row {
    display: flex;
    gap: 8px;
}

.cb-hero-palette-dot {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.12);
    box-shadow: 0 3px 10px rgba(0,0,0,0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
    display: block;
}

.cb-hero-palette-dot:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 18px rgba(0,0,0,0.5);
    z-index: 1;
    position: relative;
}

/* ── Hero Breadcrumb ───────────────────────────────────────────── */
.cb-hero-breadcrumb-wrap {
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(255,255,255,0.07);
    background: rgba(0,0,0,0.18);
    padding: 8px 0;
}

.cb-hero-breadcrumb {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    flex-wrap: wrap;
}

.cb-hero-breadcrumb li {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cb-hero-breadcrumb li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.cb-hero-breadcrumb li a:hover { color: #FFDE2D; }
.cb-hero-breadcrumb li.active { color: #ffffff; font-weight: 600; }
.cb-hero-breadcrumb .sep { color: rgba(255,255,255,0.2); font-size: 0.65rem; }

/* ══════════════════════════════════════════════════════════════
   RAINBOW STRIP
   ══════════════════════════════════════════════════════════════ */
.cb-palette-strip {
    height: 5px;
    background: linear-gradient(
        to right,
        #C62828 8.33%,
        #EF6C00 16.66%,
        #FBC02D 25%,
        #2E7D32 33.33%,
        #1565C0 41.66%,
        #6D4C41 50%,
        #ECEFF1 58.33%,
        #757575 66.66%,
        #212121 75%,
        #FFF8E1 83.33%,
        #4E342E 91.66%,
        #D81B60 100%
    );
}

/* ══════════════════════════════════════════════════════════════
   TWO-COLUMN LAYOUT
   ══════════════════════════════════════════════════════════════ */
.cb-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 20px 60px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}

/* ══════════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════════ */
.cb-sidebar {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e8eaf0;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    overflow: hidden;
    position: sticky;
    top: 90px;
    min-width: 0;
}

.cb-sidebar-header {
    padding: 16px 18px 14px;
    border-bottom: 1px solid #f0f2f8;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fafbff;
}

.cb-sidebar-header-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0d2b54, #1565C0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.cb-sidebar-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

/* ── Family List ───────────────────────────────────────────────── */
.cb-family-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.cb-family-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 18px;
    text-decoration: none;
    color: #374151;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    position: relative;
    border-left: 3px solid transparent;
    min-width: 0;
}

.cb-family-link:hover {
    background: #f8faff;
    color: #0d2b54;
    border-left-color: rgba(21,101,192,0.3);
}

.cb-family-link.active {
    background: #eef4ff;
    color: #0d2b54;
    font-weight: 700;
    border-left-color: var(--cb-family-hex, #1565C0);
}

.cb-family-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,.09);
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
    transition: transform 0.2s;
}

.cb-family-link:hover .cb-family-dot,
.cb-family-link.active .cb-family-dot {
    transform: scale(1.2);
}

.cb-family-name {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    word-wrap: break-word;
}

.cb-family-count {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    background: #f4f5f9;
    border-radius: 20px;
    padding: 2px 8px;
    border: 1px solid #e8eaf0;
    flex-shrink: 0;
}

.cb-family-link.active .cb-family-count {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
}

/* ══════════════════════════════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════════════════════════════ */
.cb-main { min-width: 0; }

/* ── Active Family Header ──────────────────────────────────────── */
.cb-family-header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e8eaf0;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    padding: 18px 22px;
    margin-bottom: 20px;
    min-width: 0;
    overflow: hidden;
}

.cb-family-hero-swatch {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: 2px solid rgba(0,0,0,.08);
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    flex-shrink: 0;
}

.cb-family-hero-info {
    flex: 1;
    min-width: 0;
}

.cb-family-hero-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin-bottom: 2px;
}

.cb-family-hero-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    overflow-wrap: anywhere;
    word-break: break-word;
    word-wrap: break-word;
}

.cb-family-hero-count {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 2px;
}

.cb-family-hero-hex {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 30px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    font-family: 'Courier New', monospace;
}

.cb-family-hero-hex-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,.1);
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   DESIGNS GRID
   ══════════════════════════════════════════════════════════════ */
.cb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 16px;
}

/* ── Design Card ───────────────────────────────────────────────── */
.cb-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e8eaf0;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cb-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0,0,0,.12);
}

.cb-card-swatch {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f4f5f9;
    position: relative;
}

.cb-card-swatch-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.cb-card:hover .cb-card-swatch-img {
    transform: scale(1.06);
}

.cb-card-swatch-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #cbd5e1;
}

.cb-card-body {
    padding: 11px 13px 14px;
}

.cb-card-code {
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 3px;
}

.cb-card-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cb-card-badge {
    display: inline-block;
    margin-top: 7px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cb-badge-active       { background: #dcfce7; color: #166534; }
.cb-badge-discontinued { background: #fee2e2; color: #991b1b; }
.cb-badge-on-request   { background: #fef3c7; color: #92400e; }
.cb-badge-limited-stock { background: #fef08a; color: #854d0e; }

/* ── Empty State ───────────────────────────────────────────────── */
.cb-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e8eaf0;
}

.cb-empty-icon { font-size: 3rem; color: #e2e8f0; margin-bottom: 18px; }
.cb-empty-title { font-size: 1.15rem; font-weight: 700; color: #1e293b; margin-bottom: 8px; }
.cb-empty-text { font-size: 0.88rem; color: #64748b; max-width: 340px; }

/* ══════════════════════════════════════════════════════════════
   CTA BANNER
   ══════════════════════════════════════════════════════════════ */
.cb-cta-section {
    max-width: 1280px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.cb-cta-card {
    background: linear-gradient(135deg, #0b1e3d 0%, #0d2b54 60%, #1565C0 100%);
    border-radius: 20px;
    padding: 36px 44px;
    display: flex;
    align-items: center;
    gap: 28px;
    position: relative;
    overflow: hidden;
}

.cb-cta-card::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}

.cb-cta-icon-box {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #FFDE2D;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.cb-cta-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.cb-cta-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 5px;
}

.cb-cta-text {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    max-width: 500px;
}

.cb-cta-action-wrap {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.cb-cta-action {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 26px;
    background: #FFDE2D;
    color: #0b1e3d;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.cb-cta-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,.35);
    background: #ffe94d;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .cb-hero-right { display: none; }
}

@media (max-width: 900px) {
    .cb-layout {
        grid-template-columns: 1fr;
        padding: 20px 16px 40px;
    }
    .cb-sidebar {
        position: static;
    }
    .cb-family-list {
        display: flex;
        flex-wrap: wrap;
        padding: 12px;
        gap: 8px;
    }
    .cb-family-link {
        border: 1.5px solid #e2e8f0;
        border-radius: 30px;
        border-left: 1.5px solid #e2e8f0;
        padding: 8px 14px;
        gap: 8px;
    }
    .cb-family-link.active {
        border-color: #1565C0;
        background: #eef4ff;
    }
    .cb-family-count { display: none; }
    .cb-grid {
        grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
        gap: 12px;
    }
    .cb-cta-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 26px 22px;
        gap: 16px;
    }
}

@media (max-width: 500px) {
    .cb-hero-inner { flex-direction: column; align-items: flex-start; }
    .cb-hero-title  { font-size: 2rem; }
    .cb-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .cb-family-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }
    .cb-hero-stats {
        flex-direction: column;
        width: 100%;
    }
    .cb-hero-stat {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding: 16px;
    }
    .cb-hero-stat:last-child {
        border-bottom: none;
    }
}
