/*
 * Wunda Automotive Products - shared page layout
 * Version: 2026-11-13.1
 *
 * Include this CSS after the existing site stylesheets on ALL six pages.
 * This is the single source of truth for the header and page alignment.
 * Page-specific content (such as the Contact Us sales cards and Wiper Finder)
 * remains controlled by its existing CSS.
 */

/* Use the original Wunda backdrop and horizontal gradient image. */
body {
    background: url('/images/background.png') repeat-x top center #00267e;
    font-family: Arial, Helvetica, sans-serif;
}

/* The same centered width on every page. */
.container {
    box-sizing: border-box;
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
}

/* The Contact Us page wraps its links in <nav>; the older pages do not. */
#top, #top * {
    box-sizing: border-box;
}

#top {
    position: relative;
    line-height: normal;
    width: 100%;
    height: 180px;
    margin: 0;
    transform: none;
    display: grid;
    grid-template-columns: 275px minmax(0, 1fr);
    grid-template-rows: 132px 48px;
    align-items: center;
}

#top h1.top-logo {
    position: static;
    grid-column: 1;
    grid-row: 1;
    display: block;
    width: 260px;
    height: auto;
    margin: 0;
}

#top .top-logo img {
    display: block;
    width: 260px;
    max-width: 100%;
    max-height: 156px;
    height: auto;
    object-fit: contain;
    border: 0;
}

#top div.text {
    grid-column: 2;
    grid-row: 1;
    float: none;
    margin: 0 5px 0 0;
    text-align: right;
}

#top h2.top-name,
#top h2.top-inc {
    text-align: right;
    color: #b0bece;
}

#top h2.top-name {
    font-size: 31px;
    line-height: 1.15;
    margin: 0;
}

#top h2.top-inc {
    font-size: 14px;
    line-height: 1.5;
    margin: 12px 0 0;
}

#top > nav,
#top > #nav {
    grid-column: 1 / -1;
    grid-row: 2;
}

#top #nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0 6px 0 0;
    list-style: none;
}

#top #nav li {
    float: none;
    padding: 0;
    margin: 0;
}

#top #nav li a {
    display: inline-block;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    padding: 7px 12px;
    margin: 0;
    border-radius: 6px;
}

#top #nav li a:hover {
    background: #15447a;
}

#top #nav a.active {
    background: #c9d7e8;
    color: #092458;
}

/* Identical white panel size and placement on all six pages. */
div#body {
    box-sizing: border-box;
    margin-top: 20px;
    margin-bottom: 48px;
    padding: 28px 34px 52px;
    background: #fff;
    box-shadow: 0 7px 28px rgba(24, 60, 109, 0.075);
}

@media (max-width: 780px) {
    .container {
        width: calc(100% - 16px);
    }

    #top {
        height: auto;
        grid-template-columns: 142px minmax(0, 1fr);
        grid-template-rows: 110px auto;
        padding: 10px 14px;
    }

    #top h1.top-logo,
    #top .top-logo img {
        width: 140px;
    }

    #top .top-logo img {
        max-height: 90px;
    }

    #top h2.top-name {
        font-size: 19px;
    }

    #top h2.top-inc {
        font-size: 10px;
        margin-top: 6px;
    }

    #top #nav {
        justify-content: center;
        gap: 3px;
        padding: 0;
    }

    #top #nav li a {
        font-size: 11px;
        padding: 6px 8px;
    }

    div#body {
        margin-top: 0;
        padding: 18px 14px 40px;
    }
}

@media (max-width: 450px) {
    #top {
        grid-template-columns: 119px minmax(0, 1fr);
    }

    #top h1.top-logo,
    #top .top-logo img {
        width: 117px;
    }

    #top h2.top-name {
        font-size: 17px;
    }

    #top h2.top-inc {
        font-size: 9px;
    }
}
