/* ===================================================================
   WRC-Software – GLOBAL STYLE SHEET
   =================================================================== */

/* ---------------- Global layout & colours ------------------------ */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #121212;
    color: #ffffff;
    font-family: Arial, sans-serif;
}

/* Links always appear white (no blue/purple) */
a:link,
a:visited {
    color: #ffffff;
    text-decoration: none;
}

/* ---------------- Header / Navigation --------------------------- */
header,
footer {
    background: #1e1e1e;
}

/* FLEX: logo hard left, menu hard right */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;   /* pushes children to edges   */
    padding: 20px 40px;
}

.logo {
    flex: 0 0 auto;
    font-size: 1.5em;
    font-weight: bold;
}

/* nav starts at the far right automatically because header
   is `space-between`; margin-left:auto is a fallback */
nav {
    margin-left: auto;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    justify-content: flex-end;        /* keeps items right-aligned */
}

nav li {
    position: relative;
}

nav a {
    color: #ffffff;
    font-weight: bold;
    padding: 8px 12px;
}

nav li.dropdown > a::after {
    content: " ▼";
    font-size: 0.8em;
}

/* Dropdown menu */
nav li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1e1e1e;
    border: 1px solid #333;
    padding: 10px 0;
    min-width: 180px;
    z-index: 100;
}

nav li:hover > ul,
nav li ul:hover {
    display: block;
}

nav li ul li a {
    display: block;
    padding: 10px 20px;
}

nav li ul li a:hover {
    background: #333;
}

/* ---------------- Main wrapper / container ---------------------- */
.wrapper {
    flex: 1;
}

.container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* ---------------- Products grid --------------------------------- */
.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    justify-items: center;
    margin-bottom: 40px;
}

.product {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 5px;
    width: 100%;
    max-width: 300px;
}

.product img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* ---------------- Footer ---------------------------------------- */
footer {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}

footer a {
    text-decoration: underline;
}

/* ---------------- Responsive tweak ------------------------------ */
@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    nav {
        margin-left: 0;
        width: 100%;
    }

    nav ul {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}
