/* =========================
   General Styles
========================= */
body {
    margin: 0;
    padding: 0;
    font-family: Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: #000000;
    text-decoration: none;
}

a:focus, a:hover {
    text-decoration: underline;
    outline: 2px solid #000000; /* Accessibility focus indicator */
}

h1, h2, h3 {
    margin-top: 1em;
    margin-bottom: 0.5em;
}

/* =========================
   Header and Menu
========================= */
header {
    background-color: #ffffff;
    padding: 1em;
    border-bottom: 1px solid #cccccc;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header img {
    max-height: 60px;
    display: block;
    margin-bottom: 0.5em;
}

nav {
    position: relative;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5em;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

nav ul li {
    display: inline-block;
    position: relative;
}

nav ul li a {
    display: block;
    padding: 0.5em 1em;
}

nav ul li ul {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background-color: #ffffff;
    min-width: 200px;
    border: 1px solid #cccccc;
    z-index: 1000;
}

nav ul li.open > ul {
    display: block;
}

nav ul li ul li {
    display: block;
}

nav ul li ul li a {
    padding: 0.5em 1em;
}

/* =========================
   Responsive Menu
========================= */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        width: 100%;
    }

    nav ul li {
        display: block;
        width: 100%;
    }

    nav ul li ul {
        position: static;
        border: none;
    }
}

/* =========================
   Main Content
========================= */
main {
    max-width: 1200px;
    margin: 2em auto;
    padding: 0 1em;
}

/* =========================
   Product Grid (for products.html)
========================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1em;
    margin-top: 1em;
}

.product-grid a {
    display: block;
    border: 1px solid #cccccc;
    padding: 1em;
    text-align: center;
    background-color: #ffffff;
}

.product-grid a img {
    max-height: 150px;
    margin-bottom: 0.5em;
}

/* =========================
   Lists
========================= */
ul {
    list-style: none;	
    padding-left: 0;
    margin-bottom: 1em;
}

/* =========================
   Footer
========================= */
footer {
    background-color: #ffffff;
    color: #000000;
    text-align: center;
    padding: 1em 0;
    border-top: 1px solid #cccccc;
    margin-top: 2em;
}

/* =========================
   Accessibility
========================= */
:focus {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

/* =========================
   Utility Classes
========================= */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* =========================
   Product Grid for images only (Railroad Ties gallery)
========================= */
.product-grid div {
    text-align: center;
}

.product-grid div img {
    width: 100%;
    height: auto;
    border: 1px solid #cccccc;
    border-radius: 5px;
    object-fit: cover;
}