/**
 * fixes_280426.css — Sprint Fixes (Faults280426.xls)
 * ===================================================
 * Supplementary stylesheet loaded after style.css.
 * Addresses CSS-level faults from the 28 Apr 2026 fault list.
 *
 * Faults addressed:
 *   F6  — Breadcrumb bar should be sticky (scrolls with page)
 *   F7  — Breadcrumb bar should show on mobile
 *   F12 — FAQ accordion: answers hidden by default, toggle on click
 *   F24 — A-Z suppliers: pipe-separated inline layout per letter group
 *   F26 — Year nav active state
 */

/* ─────────────────────────────────────────────────────────────────────────────
   F6 — Sticky breadcrumb / context bar
   The .site-header is already sticky (top:0, z-index:1000).
   The .breadcrumb-container sits immediately below it; make it sticky too
   so it stays visible as the user scrolls.
───────────────────────────────────────────────────────────────────────────── */
.breadcrumb-container {
    position: sticky;
    /* Sit directly below the site-header. The header is ~81px tall (50px logo
       + 15px padding top + 15px padding bottom + 1px border).
       Using 82px as a safe value; adjust if header height changes. */
    top: 82px;
    z-index: 999;
    background-color: #f8f9fa;
}

/* ─────────────────────────────────────────────────────────────────────────────
   F7 — Breadcrumb bar visible on mobile
   The existing CSS hides .desktop-only on mobile, which hides the context
   switcher (supplier/location/Update). The breadcrumb trail itself is not
   hidden, but the container needs to remain visible.
   Ensure the breadcrumb-container is never display:none on mobile.
───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .breadcrumb-container {
        display: block !important;
        top: 0; /* On mobile the header is not sticky, so breadcrumb starts at top */
    }
    /* Show a compact single-line breadcrumb on mobile */
    .breadcrumb-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }
    .breadcrumb-nav {
        flex: 1;
        min-width: 0;
    }
    .breadcrumb {
        flex-wrap: nowrap;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   F12 — FAQ Accordion
   The JS in menu.js now wraps answers in .faq-answer and hides them via
   inline style. These rules provide the visual styling for open/closed states.
───────────────────────────────────────────────────────────────────────────── */

/* Override the faq-sections page-level FAQ items to use the accordion pattern */
.faq-sections .faq-item {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
    padding: 0;
}

.faq-sections .faq-item h4,
.faq-sections .faq-item .faq-question {
    cursor: pointer;
    padding: 18px 40px 18px 0;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark, #1a1a1a);
    position: relative;
    transition: color 0.2s;
    user-select: none;
}

.faq-sections .faq-item h4:hover,
.faq-sections .faq-item .faq-question:hover {
    color: var(--primary-orange, #FF6B00);
}

/* Plus/minus indicator */
.faq-sections .faq-item h4::after,
.faq-sections .faq-item .faq-question::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--primary-orange, #FF6B00);
    line-height: 1;
}

.faq-sections .faq-item.active h4::after,
.faq-sections .faq-item.active .faq-question::after {
    content: '−';
}

/* Answer wrapper — JS sets display:none/'' but we also add padding */
.faq-sections .faq-item .faq-answer {
    padding: 0 0 16px 0;
    color: #555;
    font-size: 0.97rem;
    line-height: 1.7;
}

/* Standalone .faq-accordion (used on other pages) — ensure same behaviour */
.faq-accordion .faq-item h4,
.faq-accordion .faq-item .faq-question {
    cursor: pointer;
    padding: 18px 40px 18px 0;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark, #1a1a1a);
    position: relative;
    transition: color 0.2s;
    user-select: none;
}

.faq-accordion .faq-item h4::after,
.faq-accordion .faq-item .faq-question::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--primary-orange, #FF6B00);
    line-height: 1;
}

.faq-accordion .faq-item.active h4::after,
.faq-accordion .faq-item.active .faq-question::after {
    content: '−';
}

/* Override max-height transition — JS uses display:none/'' so max-height
   transition is not needed. Reset to allow natural height. */
.faq-answer {
    overflow: visible;
    max-height: none !important;
    transition: none !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   F24 — A-Z Suppliers: pipe-separated inline layout per letter group
───────────────────────────────────────────────────────────────────────────── */

/* Jump nav */
.atoz-jump-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 32px;
}
.atoz-letter-btn {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    background: #f8f9fa;
    border: 1px solid #DEE2E6;
    color: #333;
    transition: all 0.2s;
}
.atoz-letter-btn.has-items:hover {
    background: #FF6B00;
    color: #fff;
    border-color: #FF6B00;
}
.atoz-letter-btn.no-items {
    color: #ccc;
    cursor: default;
    pointer-events: none;
}

/* Letter groups */
.atoz-groups {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.atoz-group {
    display: flex;
    align-items: baseline;
    gap: 0;
    border: 1px solid #DEE2E6;
    border-radius: 4px;
    margin-bottom: 8px;
    background: #fff;
    overflow: hidden;
}

.atoz-group-letter {
    flex-shrink: 0;
    width: 40px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    background: #FF6B00;
    padding: 10px 0;
}

.atoz-supplier-row {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 2;
    word-break: break-word;
}

.atoz-supplier-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}

.atoz-supplier-link:hover {
    color: #FF6B00;
    text-decoration: underline;
}

.atoz-pipe {
    color: #aaa;
    margin: 0 2px;
    user-select: none;
}

/* ─────────────────────────────────────────────────────────────────────────────
   F26 — Year nav active state
───────────────────────────────────────────────────────────────────────────── */
.year-nav-link--active {
    background: #FF6B00 !important;
    color: #fff !important;
    border-color: #FF6B00 !important;
    font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Testimonial count badge
───────────────────────────────────────────────────────────────────────────── */
.testimonial-count {
    font-size: 0.8em;
    font-weight: 400;
    color: #888;
    margin-left: 8px;
}

/* Year section link */
.year-section-link {
    font-size: 14px;
    margin-bottom: 16px;
}
.year-section-link a {
    color: #FF6B00;
    text-decoration: none;
    font-weight: 600;
}
.year-section-link a:hover {
    text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Suppliers hub grid (Popular Suppliers)
───────────────────────────────────────────────────────────────────────────── */
.suppliers-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

/* Range tags (Argos page, Ikea page) */
.range-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}
.range-tag {
    display: inline-block;
    padding: 5px 12px;
    background: #f8f9fa;
    border: 1px solid #DEE2E6;
    border-radius: 20px;
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

/* Pricing table */
.pricing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.pricing-table th {
    background: #FF6B00;
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
}
.pricing-table td {
    padding: 9px 14px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}
.pricing-table tr:nth-child(even) td {
    background: #fafafa;
}
.pricing-table tr:hover td {
    background: #fff3eb;
}
.pricing-note {
    font-size: 13px;
    color: #666;
    margin-top: 12px;
}
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Fault 2 & 3 — Featured image sections: same width as video, fill border
   The video wrapper uses max-width:800px. Images should match.
   object-fit:cover fills the border without white space.
───────────────────────────────────────────────────────────────────────────── */
.featured-image-section {
    padding: 40px 20px;
    background-color: #fff;
}

/* Override the contain/white-space behaviour from style.css */
img.featured-image,
.featured-image img,
.featured-image-section img,
.featured-image-section .featured-image {
    width: 100% !important;
    max-width: 800px !important;   /* Match video wrapper max-width */
    height: 450px !important;      /* Fixed height to match 16:9 video at 800px wide */
    display: block !important;
    object-fit: cover !important;  /* FIX Fault 3: fill border, no white space */
    object-position: center !important;
    margin: 0 auto !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* FIX Fault 5: Image link wrapper — makes the whole image clickable */
.featured-image-link {
    display: block;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
}
.featured-image-link img.featured-image,
.featured-image-link .featured-image {
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    display: block !important;
    height: 450px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 0 !important;  /* border-radius on the link wrapper instead */
}

@media (max-width: 900px) {
    img.featured-image,
    .featured-image img,
    .featured-image-section img,
    .featured-image-section .featured-image {
        height: 300px !important;
    }
}
@media (max-width: 600px) {
    img.featured-image,
    .featured-image img,
    .featured-image-section img,
    .featured-image-section .featured-image {
        height: 220px !important;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Responsive
───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
    .atoz-group {
        flex-direction: column;
    }
    .atoz-group-letter {
        width: 100%;
        min-height: 36px;
        border-radius: 0;
    }
    .atoz-supplier-row {
        padding: 8px 12px;
    }
    .suppliers-hub-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .suppliers-hub-grid {
        grid-template-columns: 1fr;
    }
}
/* ─────────────────────────────────────────────────────────────────────────────
   Fault 16 — Range pipe row (supplier pages)
───────────────────────────────────────────────────────────────────────────── */
.range-pipe-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: center;
    margin-top: 16px;
    font-size: 14px;
    line-height: 2;
}
.range-pipe-item {
    white-space: nowrap;
    padding: 2px 0;
}
.range-pipe-item strong {
    color: #333;
    font-weight: 600;
}
.range-count {
    color: #888;
    font-size: 12px;
}
.range-pipe-sep {
    color: #bbb;
    padding: 0 6px;
    user-select: none;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Fault 18 — Our Credentials section (supplier pages)
───────────────────────────────────────────────────────────────────────────── */
.credentials-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0 24px;
    align-items: flex-start;
}
.credential-badge-link {
    display: inline-block;
    text-decoration: none;
    flex-shrink: 0;
}
.credential-badge-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 6px;
    transition: opacity 0.2s;
}
.credential-badge-img:hover {
    opacity: 0.85;
}
.credentials-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.credentials-list li {
    padding: 6px 0;
    font-size: 15px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.credentials-list li:last-child {
    border-bottom: none;
}
.cred-tick {
    color: #28a745;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Fault 4 — Hamburger menu z-index fix (home page hero overlap)
   The hero section creates a stacking context; ensure the header and nav
   sit above it. The JS toggles .active on both .hamburger and .primary-nav.
───────────────────────────────────────────────────────────────────────────── */
.site-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1100 !important;
}
.hamburger {
    z-index: 1101 !important;
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
@media (max-width: 768px) {
    .primary-nav {
        z-index: 1099 !important;
    }
    .primary-nav.active {
        display: block !important;
        z-index: 1099 !important;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Fault 17 — Example Quotes table on /prices/ page
   The pricing-quote-table and card layout should match the pricing-widget-table
   styling used on supplier pages.
───────────────────────────────────────────────────────────────────────────── */
.pricing-quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
    margin-top: 20px;
}
.pricing-quote-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.pricing-quote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a2e4a;
    color: #fff;
    padding: 10px 16px;
    font-size: 14px;
}
.pricing-quote-label {
    font-weight: 700;
    font-size: 15px;
}
.pricing-quote-location {
    font-size: 13px;
    opacity: 0.85;
}
table.pricing-quote-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
table.pricing-quote-table th {
    background: #f5f7fa;
    color: #1a2e4a;
    font-weight: 600;
    padding: 8px 12px;
    border-bottom: 2px solid #d0d7e2;
    text-align: left;
}
table.pricing-quote-table th.text-center,
table.pricing-quote-table td.text-center {
    text-align: center;
}
table.pricing-quote-table th.text-right,
table.pricing-quote-table td.text-right {
    text-align: right;
}
table.pricing-quote-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eef0f4;
    color: #333;
}
table.pricing-quote-table tbody tr:hover {
    background: #f9fbff;
}
table.pricing-quote-table tfoot tr.quote-subtotal-row td,
table.pricing-quote-table tfoot tr.quote-callout-row td {
    padding: 6px 12px;
    font-size: 13px;
    color: #555;
    border-bottom: 1px solid #eef0f4;
    background: #fafbfc;
}
table.pricing-quote-table tfoot tr.quote-total-row td {
    padding: 10px 12px;
    background: #1a2e4a;
    color: #fff;
    font-size: 15px;
}
table.pricing-quote-table tfoot tr.quote-total-row td .price-cell,
table.pricing-quote-table tfoot tr.quote-total-row .price-cell {
    color: #f5a623;
    font-size: 16px;
}
.pricing-quote-footer {
    padding: 10px 16px;
    font-size: 13px;
    color: #555;
    background: #f9fbff;
    border-top: 1px solid #eef0f4;
}
.pricing-quote-footer a {
    color: #1a2e4a;
    font-weight: 600;
    text-decoration: none;
}
.pricing-quote-footer a:hover {
    text-decoration: underline;
}
@media (max-width: 600px) {
    .pricing-quotes-grid {
        grid-template-columns: 1fr;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Fault 16 — Range pipe links (clickable range items)
───────────────────────────────────────────────────────────────────────────── */
.range-pipe-link {
    text-decoration: none;
    color: inherit;
}
.range-pipe-link:hover .range-pipe-item strong {
    color: #FF6B00;
    text-decoration: underline;
}
.range-pipe-link:hover .range-count {
    color: #FF6B00;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Fault 17 — pricing-widget-table formatting
───────────────────────────────────────────────────────────────────────────── */
table.pricing-widget-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 12px;
}
table.pricing-widget-table thead th {
    background: #FF6B00;
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
}
table.pricing-widget-table tbody td {
    padding: 9px 14px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}
table.pricing-widget-table tbody tr:nth-child(even) td {
    background: #fafafa;
}
table.pricing-widget-table tbody tr:hover td {
    background: #fff3eb;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Fault 23 — Supplier card banner images
───────────────────────────────────────────────────────────────────────────── */
.supplier-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
    padding: 0;
}
.supplier-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.supplier-card-banner {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
}
.supplier-card-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.supplier-card h3,
.supplier-card p,
.supplier-card-cta {
    padding-left: 16px;
    padding-right: 16px;
}
.supplier-card h3 {
    margin-top: 14px;
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}
.supplier-card p {
    font-size: 13px;
    color: #555;
    flex-grow: 1;
    margin-bottom: 10px;
}
.supplier-card-cta {
    display: block;
    padding-bottom: 14px;
    font-size: 13px;
    color: #FF6B00;
    font-weight: 600;
}


/* ─────────────────────────────────────────────────────────────────────────────
   Fault 8 — Mobile context-switcher dropdown
   The mobile tracker Update button now opens an inline dropdown form
   (id=ctxDropdownMobile) instead of linking to /update-preferences/.
───────────────────────────────────────────────────────────────────────────── */
.mobile-ctx-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d0d7e2;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 1200;
    padding: 16px;
}
.mobile-ctx-dropdown .ctx-form-row { margin-bottom: 12px; }
.mobile-ctx-dropdown label { display: block; font-size: 13px; font-weight: 600; color: #1a2e4a; margin-bottom: 4px; }
.mobile-ctx-dropdown .ctx-input { width: 100%; padding: 8px 10px; border: 1px solid #c0c8d8; border-radius: 4px; font-size: 14px; box-sizing: border-box; }
.mobile-ctx-dropdown .ctx-form-actions { display: flex; gap: 8px; margin-top: 4px; }
.mobile-ctx-dropdown .ctx-save-btn { flex: 1; padding: 8px 12px; font-size: 14px; }
.mobile-ctx-dropdown .ctx-cancel-btn { background: none; border: 1px solid #c0c8d8; border-radius: 4px; padding: 8px 12px; font-size: 14px; cursor: pointer; color: #555; }
.mobile-ctx-dropdown .ctx-cancel-btn:hover { background: #f5f7fa; }
button.update-link { background: none; border: none; padding: 0; cursor: pointer; font: inherit; color: inherit; text-decoration: underline; }
.mobile-tracker { position: relative; }
