/* ============================================================
   Custom site overrides
   ============================================================ */


/* ------------------------------------------------------------
   Product modal
   Disable interaction with the header while the modal is open.
   Bootstrap adds "modal-open" to <body> automatically.
   ------------------------------------------------------------ */

body.modal-open #masthead {
    pointer-events: none !important;
    z-index: 1 !important;
}

/* ============================================================
   Products mega menu
   ============================================================ */

#masthead .products-mega-menu {
    column-count: 3;
    column-gap: 20px;
    width: 100%;
    margin: 0;
    padding: 20px 25px;
    list-style: none;
}

/* Category columns */
#masthead .products-mega-column {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    padding: 0 20px 20px;
    margin: 0;
}

/* Brand list */
#masthead .products-mega-column > ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Brand items */
#masthead .products-mega-column > ul > li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Brand links */
#masthead .products-mega-column > ul > li > a {
    display: block;
    margin: 0;
    padding: 3px 0;
    line-height: 1.4;
}

/* ============================================================
   Centered row (overrides Bootstrap 3's float-based grid)
   ============================================================ */
.row-centered {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.row-centered [class*="col-"] {
    float: none; /* cancel Bootstrap 3's float so flex takes over */
}

/* ============================================================
   Static map: hover animation + click-through CTA badge
   ============================================================ */

.map-static-link {
    display: block;
}

.map-static-wrap {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.map-static-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    margin: 0;
    transition: transform 0.4s ease, filter 0.4s ease;
}

/* Desktop hover: zoom + slight darken so the CTA text stays legible */
.map-static-link:hover .map-static-img {
    transform: scale(1.05);
    filter: brightness(0.75);
}

/* CTA badge: always visible (so it works on touch devices with no hover),
   but grows slightly more prominent on hover for a bit of feedback. */
.map-static-cta {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%) scale(1);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: background 0.3s ease, transform 0.3s ease;
    pointer-events: none; /* clicks pass through to the <a> underneath */
}

.map-static-cta i {
    margin-right: 6px;
}

.map-static-link:hover .map-static-cta {
    background: rgba(0, 0, 0, 0.9);
    transform: translateX(-50%) scale(1.05);
}

/* ============================================================
   Quotation form
   ============================================================ */

.quotation-section {
    background-color: #e5e5e5;
    padding-bottom: 100px;
}


/* ============================================================
   Mobile formatting
   ============================================================ */

@media (max-width: 767px) {
    /* The navbar is the only scrolling container */
    .navbar-collapse.main-navbar {
        max-height: calc(100vh - 80px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .products-mega-menu {
        position: static !important;
        float: none !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;      /* removes the inner scroll */
        overflow: visible !important;
        box-shadow: none;
        border: 0;
        padding: 10px 15px !important;
        box-sizing: border-box;
    }

    .open > .products-mega-menu {
        display: block !important;
        column-count: 1 !important;
        columns: auto !important;
    }

    .products-mega-column {
        display: block !important;
        position: static !important;
        float: none !important;
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 0 12px !important;
        list-style: none;
        box-sizing: border-box;
    }

    .products-mega-column > a {
        display: block;
        font-size: 16px;
        padding: 10px 0 4px;
        border-bottom: 1px solid rgba(0,0,0,.08);
        white-space: normal !important;
    }

    .products-mega-column > ul {
        list-style: none;
        margin: 4px 0 0;
        padding-left: 15px;
    }

    .products-mega-column li a {
        display: block;
        padding: 8px 0;
        font-size: 15px;
        white-space: normal !important;
        word-wrap: break-word;
    }
}