@import url("https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,100..900;1,100..900&display=swap");

/* Base styles */
html {
    background: repeating-linear-gradient(45deg, transparent, transparent 4px, #ccc 4px, #ccc 12px),
    linear-gradient(to bottom, white, #dadada);
    font-family: "Noto Serif", serif;
}

/* Layout */
body {
    margin: 0 auto;
    min-height: 100vh;
    max-width: 1200px;
    border: 1px solid black;
    border-top: 0;
    border-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Hide border when background isn't visible */
@media screen and (max-width: 1201px) {
    body {
        border: none;
    }
}

/* Header */
header {
    height: 140px;
    background: linear-gradient(to right, white, #ffffff30),
    center center / cover no-repeat url("../img/header.png");

    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Header text (p in .location and .hours) */
header p {
    margin: 0;
}

/* Logo */
.header-left img {
    height: 140px;
    margin-top: -4px;
}

/* Location and hours container */
.header-right > div {
    margin: auto 24px auto auto;
}

.location {
    background: black;
    color: white;
    font-weight: bolder;

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px 12px 6px;
}

.location a {
    text-decoration: none;
    color: white;
}

.location a:hover {
    text-decoration: underline;
}

/* Marker icon */
.location > img {
    height: 40px;
    margin: 0 12px;
}

.hours {
    background: white;
    color: black;
    font-weight: bolder;

    padding: 6px 8px 6px 6px;
    text-align: center;
}

/* Phone number */
.hours a {
    white-space: nowrap;
    color: black;
}

/* Under 470px, start scaling the location box */
@media screen and (max-width: 470px) {
    .location {
        font-size: 0.9em;
        padding: 8px 12px 8px 6px;
    }

    .location > img {
        height: 32px;
        margin: 0 8px;
    }

    .hours {
        font-size: 0.9em;
        padding: 4px 6px 4px 4px;
    }
}

/* Navigation bar */
nav {
    display: flex;
    align-items: center;

    height: 40px;
    background: black;
    color: white;

    border: 6px solid black;
    border-left: 0;
    border-right: 0;

    position: relative;
}

/* Navigation bar outline */
nav::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    border: 4px solid white;
    border-left: 0;
    border-right: 0;
}

/* Navigation list */
nav ol {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-evenly;
    margin: 0;
    padding: 0;
    list-style-type: none;
}

/* Alternate navigation menu button */
.navigation {
    display: none;
    cursor: pointer;
}

/* If the screen is less than 720px, we hide everything except .cart, and show .navigation */
@media screen and (max-width: 720px) {
    nav ol li:not(:first-child):not(:last-child) {
        display: none;
    }

    nav ol {
        justify-content: space-between;
        padding: 0 32px;
    }

    .navigation {
        display: block;
    }
}

/* Navigation links */
nav ol li a {
    font-size: 16px;
    color: white;
    text-decoration: none;
    font-weight: 800;

    position: relative;
}

/* Navigation links on hover */
nav ol li a:hover {
    text-decoration: underline;
}

/* Navigation icons */
nav ol li img {
    height: 16px;
    margin: 0 4px -2px 0;
}

/* Show submenu on item hover (except for the alternate menu) */
nav ol li:hover .menu:not(#navigation) {
    display: block;
}

/* Dropdown menu container - creates a small invisible box to prevent the menu from hiding too easily */
.menu {
    position: absolute;
    top: 30px;
    margin-left: -8px;
    z-index: 1;
    background-color: transparent;
    padding-top: 6px;
    display: none;
}

/* Dropdown menu content */
.menu div {
    background-color: #3b3b3b;
    min-width: 160px;
    box-shadow: 0 8px 12px 3px #00000033;
    border: 4px double white;
}

.menu div a:first-child {
    padding-top: 4px;
}

/* Dropdown menu links */
.menu div a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 0 12px 4px;
}

/* Dropdown menu separator line */
.menu div a:not(:last-child):after {
    content: "";
    width: 100%;
    height: 1px;
    background-color: #ffffff50;
    display: block;
    margin-top: 4px;
}

/* Main content */
main {
    background: white;
    flex-grow: 1;
}

/* Generic page header */
main > h1 {
    margin: 0;
    background: #e1e1e1;
    color: #3b3b3b;
    text-align: center;
    padding: 24px;
}

/* Page section */
main > section {
    padding: 32px;
}

/* Footer */
footer {
    display: flex;
    justify-content: space-between;
    background: black;
    color: white;
    padding: 32px 64px 0 48px;

    /* for when it gets too small */
    flex-wrap: wrap;
}

/* Logo and copyright container */
footer div:first-child {
    display: flex;
    min-height: 156px;
    flex-direction: column;
    justify-content: space-between;
}

footer div {
    padding: 12px 12px 0 24px;
}

/* Logo */
footer div:first-child img {
    height: 120px;
}

/* Footer section */
footer div:not(.socials) {
    min-width: 180px;
}

/* Footer section titles */
footer h2 {
    margin: 0 0 8px;
}

/* Footer links */
footer a {
    color: white;
    text-decoration: none;
    display: block;
    width: fit-content;
    margin-bottom: 12px;
}

footer a:hover {
    text-decoration: underline;
}

/* Social icons */
footer .socials {
    display: flex;
    align-items: center;
    padding: 0;
}

footer .socials a {
    margin-bottom: 0;
}

footer .socials img {
    height: 24px;
    margin-right: 12px;
}

/* Copyright */
footer p:last-of-type {
    margin-top: 12px;
    margin-bottom: 32px;
}

