
/* =========================================================
   QPET SHARED STYLESHEET

   Page styles are kept in their existing files.
   Additional refinements appear below the imports.
   ========================================================= */

@import url("base.css");
@import url("components.css");
@import url("home.css");
@import url("about.css");
@import url("products.css");
@import url("contact.css");
@import url("reviews.css");
@import url("admin.css");
@import url("client-feedback.css");
@import url("admin-light.css");

/* =========================================================
   SHARED QPET LOGOS
   ========================================================= */

.public-body .brand-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
    gap: 0;
    padding: 0;
    line-height: 1;
    text-decoration: none;
}

.public-body .qpet-logo {
    display: block;
    height: auto;
    object-fit: contain;
}

.public-body .qpet-header-logo {
    width: 118px;
    max-height: 61px;
}

.public-body .brand-logo-link:hover .qpet-header-logo {
    opacity: 0.85;
}

.public-body .qpet-footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.public-body .qpet-footer-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 13px;
    border-radius: 12px;
    background: #f3f7fb;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    transition: background 0.2s ease;
}

    .public-body .qpet-footer-logo-link:hover {
        background: #ffffff;
    }

.public-body .qpet-footer-logo {
    width: 135px;
    height: auto;
}

.public-body .qpet-footer-brand p {
    max-width: 320px;
    margin: 0;
    color: #aebdd1;
    font-size: 13px;
    line-height: 1.6;
}

.public-body .qpet-footer-copyright p {
    margin: 0;
    color: #aebdd1;
    font-size: 12px;
    line-height: 1.6;
}

.public-body .brand-logo-link:focus-visible,
.public-body .qpet-footer-logo-link:focus-visible {
    outline: 3px solid #247cff;
    outline-offset: 4px;
}

/* =========================================================
   PRODUCT CATALOGUE — CLEAN WHITE IMAGE SURFACES
   ========================================================= */

.public-body .qpc-page .qpc-card {
    background: #ffffff;
}

.public-body .qpc-page .qpc-product-image {
    display: grid;
    place-items: center;
    min-width: 0;
    overflow: hidden;
    padding: clamp(14px, 2vw, 22px);
    background: #ffffff;
}

    .public-body .qpc-page .qpc-product-image img {
        display: block;
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        margin: auto;
        object-fit: contain;
        object-position: center;
        background: #ffffff;
    }

.public-body .qpc-page .qpc-card:hover
.qpc-product-image img {
    transform: none;
}

.public-body .qpc-page .qpc-card-body {
    background: #ffffff;
}

.public-body .qpc-page .qpc-category-label {
    background: rgba(255, 255, 255, 0.98);
}

/* =========================================================
   HOMEPAGE — RESPONSIVE MANUFACTURING SHOWCASE
   ========================================================= */

/* Larger screens: descriptive text beside the video. */

.public-body .qbh-home .qbh-manufacturing-grid {
    align-items: start;
    gap: clamp(20px, 3vw, 48px);
}

.public-body .qbh-home .qbh-manufacturing-copy {
    min-width: 0;
}

.public-body .qbh-home .qbh-process {
    min-width: 0;
    width: 100%;
}

.public-body .qbh-home .qbh-video-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #ffffff;
}

    .public-body .qbh-home .qbh-video-frame video {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
        background: #ffffff;
    }

.public-body .qbh-home .qbh-video-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

    .public-body .qbh-home .qbh-video-options
    .qhp-process-option {
        min-width: 0;
        overflow-wrap: anywhere;
    }

/* Medium laptops and landscape tablets */

@media (min-width: 840px) and (max-width: 900px) {
    .public-body .qbh-home .qbh-manufacturing-grid {
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
        gap: 20px;
    }

    .public-body .qbh-home .qbh-manufacturing-copy h2 {
        font-size: clamp(1.6rem, 3vw, 2.2rem);
    }

    .public-body .qbh-home .qbh-process {
        padding: 14px;
    }
}

/* Tablets and phones:
   Put the heading immediately above the video.
   Supporting paragraphs follow the player instead
   of pushing it far down the screen. */

@media (max-width: 839px) {
    .public-body .qbh-home .qbh-manufacturing-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 14px;
    }

    .public-body .qbh-home .qbh-manufacturing-copy {
        display: contents;
    }

        .public-body .qbh-home
        .qbh-manufacturing-copy > .qbh-overline {
            order: 0;
            margin-bottom: 0;
        }

        .public-body .qbh-home
        .qbh-manufacturing-copy > h2 {
            order: 1;
            max-width: none;
            margin: 0;
        }

    .public-body .qbh-home .qbh-process {
        order: 2;
        width: 100%;
        padding: clamp(12px, 3vw, 18px);
    }

    .public-body .qbh-home
    .qbh-manufacturing-copy > p {
        order: 3;
        max-width: none;
        margin: 0;
    }

    .public-body .qbh-home
    .qbh-manufacturing-copy > .qbh-text-link {
        order: 4;
        margin-top: 0;
    }
}

/* Narrow phones */

@media (max-width: 480px) {
    .public-body .qbh-home .qbh-manufacturing-grid {
        gap: 12px;
    }

    .public-body .qbh-home .qbh-process {
        padding: 11px;
        border-radius: 12px;
    }

    .public-body .qbh-home .qbh-process-heading {
        gap: 6px;
        margin-bottom: 10px;
    }

    .public-body .qbh-home .qbh-video-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

        .public-body .qbh-home .qbh-video-options
        .qhp-process-option {
            min-height: 42px;
            padding: 8px 6px;
            font-size: 0.72rem;
        }

    .public-body .qbh-home .qbh-video-title {
        align-items: center;
    }
}

/* =========================================================
   RESPONSIVE BRAND LOGOS
   ========================================================= */

@media (max-width: 800px) {
    .public-body .qpet-header-logo {
        width: 105px;
        max-height: 54px;
    }
}

@media (max-width: 600px) {
    .public-body .qpet-header-logo {
        width: 94px;
        max-height: 48px;
    }

    .public-body .qpet-footer-logo {
        width: 120px;
    }

    .public-body .qpet-footer-brand {
        gap: 10px;
    }

        .public-body .qpet-footer-brand p,
        .public-body .qpet-footer-copyright p {
            font-size: 12px;
        }
}

@media (prefers-reduced-motion: reduce) {
    .public-body .qpc-page .qpc-product-image img {
        transition: none;
        transform: none;
    }
}

/* QPET REFINEMENT BATCH NOVEMBER 18 */

/* Accurate quick-link scrolling */

html {
    scroll-padding-top: 96px;
}

#sendEnquiry,
#contactBranches,
#aboutStory,
#tethered-closures,
#whatWeOffer,
#qpcCatalogue,
#qbhProductRange,
#inside-the-process {
    scroll-margin-top: clamp(80px, 8vw, 110px);
}

/* Manufacturing video logo cover */

.public-body .qbh-home .qbh-video-frame {
    position: relative;
    isolation: isolate;
    background: #ffffff;
}

.public-body .qbh-home .qbh-video-cover {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 2vw, 20px);
    width: 100%;
    height: 100%;
    padding: clamp(12px, 3vw, 30px);
    border: 0;
    border-radius: inherit;
    background: #ffffff;
    color: #123b63;
    font: inherit;
    font-size: clamp(0.75rem, 1.5vw, 0.95rem);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}

.public-body .qbh-home .qbh-video-cover img {
    display: block;
    width: min(55%, 250px);
    max-height: 60%;
    height: auto;
    object-fit: contain;
}

.public-body .qbh-home .qbh-video-cover[hidden] {
    display: none !important;
}

.public-body .qbh-home .qbh-video-cover:focus-visible {
    outline: 3px solid #247cff;
    outline-offset: -5px;
}

/* Desktop — text and video visible side by side */

@media (min-width: 1021px) {
    .public-body .qbh-home .qbh-manufacturing-grid {
        display: grid;
        grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
        align-items: start;
        gap: clamp(22px, 3vw, 46px);
    }

    .public-body .qbh-home .qbh-manufacturing-copy {
        display: block;
        min-width: 0;
    }

    .public-body .qbh-home .qbh-process {
        min-width: 0;
    }
}

/* Tablets and phones — avoid cramped columns */

@media (max-width: 1020px) {
    .public-body .qbh-home .qbh-manufacturing-grid {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: clamp(15px, 3vw, 24px);
    }

    .public-body .qbh-home .qbh-manufacturing-copy {
        display: block;
        order: 0;
        width: 100%;
        max-width: 740px;
    }

    .public-body .qbh-home .qbh-process {
        order: 1;
        width: 100%;
        min-width: 0;
    }
}

/* Compact phones */

@media (max-width: 480px) {
    .public-body .qbh-home .qbh-video-cover {
        gap: 8px;
        padding: 12px;
    }

    .public-body .qbh-home .qbh-video-cover img {
        width: min(50%, 160px);
    }

    .public-body .qbh-home .qbh-video-cover span {
        font-size: 0.72rem;
    }
}

/* Consistent white product images */

.public-body .qpc-page .qpc-product-image,
.public-body .qpc-page .qpc-product-image img,
.public-body .qpc-page .qpc-card-body {
    background-color: #ffffff;
}

.public-body .qpc-page .qpc-product-image img {
    object-fit: contain;
    object-position: center;
}

/* QPET TETHERED CAPS WHITE BACKGROUND FIX */

.public-body .qba-page .qba-tethered-image {
    background: #ffffff !important;
    background-image: none !important;
}

.public-body .qba-page .qba-tethered-image img {
    background-color: #ffffff;
}

/* QPET PRECISE QUICK LINK SCROLLING */

/*
   The shared stylesheet already uses scroll-padding-top
   for the sticky navigation header.
   Avoid applying a second offset to these targets.
*/

#qpcCatalogueTitle,
#qbaManufacturing,
#aboutStory,
#sendEnquiry,
#contactBranches,
#whatWeOffer,
#tethered-closures,
#qbhProductRange,
#inside-the-process,
#shareReview {
    scroll-margin-top: 0 !important;
}

/* QPET PRODUCT CARD LAYOUT FINAL FIX */

/* Fixed column count regardless of search result count. */

body.public-body .qpc-page #qpcGrid.qpc-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 20px;
    align-items: stretch;
    justify-content: start;
    width: 100%;
}

/* Preserve the existing search filtering behavior. */

body.public-body .qpc-page #qpcGrid[hidden],
body.public-body .qpc-page .qpc-card[hidden] {
    display: none !important;
}

/* Prevent cards from stretching across the page. */

body.public-body .qpc-page .qpc-card {
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0;
    max-width: 100% !important;
    height: 100%;
    align-self: stretch;
}

/* Consistent, pure-white product image area. */

body.public-body .qpc-page .qpc-product-image {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;
    flex: 0 0 220px;
    overflow: hidden;
    background: #fff !important;
    background-image: none !important;
}

/* Fit the complete product image inside its area. */

body.public-body .qpc-page .qpc-product-image img {
    box-sizing: border-box;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    padding: 12px;
    margin: 0;
    background: #fff !important;
    transform: none !important;
}

/* Centre missing-image logo, with comfortable whitespace. */

body.public-body .qpc-page .qpc-product-image img.qpc-logo-fallback {
    width: 65% !important;
    height: 65% !important;
    object-fit: contain !important;
    padding: 0 !important;
    margin: auto;
}

/* Keep the product details and enquiry button consistent. */

body.public-body .qpc-page .qpc-card-body {
    box-sizing: border-box;
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

body.public-body .qpc-page .qpc-enquire {
    margin-top: auto;
}

/* Responsive product grid. */

@media (max-width: 1100px) {
    body.public-body .qpc-page #qpcGrid.qpc-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 820px) {
    body.public-body .qpc-page #qpcGrid.qpc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px;
    }
}

@media (max-width: 600px) {
    body.public-body .qpc-page #qpcGrid.qpc-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.public-body .qpc-page .qpc-product-image {
        height: 200px !important;
        min-height: 200px !important;
        max-height: 200px !important;
        flex-basis: 200px;
    }
}

/* QPET PRODUCT IMAGE PRESENTATION REFINEMENT */

/* Give product photographs more breathing room vertically. */

body.public-body .qpc-page .qpc-product-image {
    height: 270px !important;
    min-height: 270px !important;
    max-height: 270px !important;
    flex: 0 0 270px !important;
    padding: 0 !important;
    background: #ffffff !important;
}

/* Use all available image space without distortion. */

body.public-body .qpc-page .qpc-product-image img:not(.qpc-logo-fallback) {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
}

/* Preserve the centred fallback logo. */

body.public-body .qpc-page .qpc-product-image img.qpc-logo-fallback {
    width: 65% !important;
    height: 65% !important;
    padding: 0 !important;
    object-fit: contain !important;
}

/* Balanced display on phones. */

@media (max-width: 600px) {
    body.public-body .qpc-page .qpc-product-image {
        height: 240px !important;
        min-height: 240px !important;
        max-height: 240px !important;
        flex-basis: 240px !important;
    }
}