/* apparently theres a very common model of css values, im just going to dump it here for reference:
- layout
- size
- decoration
*/
/*TODO: fetch design ideas from school website but DO NOT copy and paste it exactly*/

/*==============ROOT================*/
/*variables and other silly*/
:root {
    --base: #E7EAD9;
    --mantle1: #c9daa1;
    --mantle2: #DAA1D4;
    --crust1: #83A62E;
    --crust2: #912f9e;
    --accent1: #6db539;
    --accent2: #9a39b5;
    --crust1hover: #9ec542;

    --font-header: Lexend Deca, sans-serif;
    --font-base: Poppins, sans-serif;
    --font-important: Montserrat, sans-serif;
    --font-classy: Garamond, Times New Roman, serif;
}

/*=========== GENERAL ==============*/
/*general stuff, just shit youd be using on the regular*/
* {
    box-sizing: border-box;
}
div {
    padding: 0.625rem;
}
body {
    overflow-x: hidden;
    background: var(--mantle2);
}

h1 { /* acts as BIG title */
    /* TODO: figure out FINAL design for this */
    display: block;
    width: auto;
    padding: 0.5rem;
    margin: 0.67em -0.5rem;
    font-family: var(--font-header);
    color: var(--base);
    background: var(--crust2);
}
h2, h3, h4, h5, h6 { /* acts as regular headers except h6 is chopped off (sorry h6) */
    margin: 0.625rem;
    margin-left: 0.25rem;
    padding: 0;
    font-family: var(--font-header);
    color: var(--crust2);
}
/* sizing changes */
h2 {font-size: 2em;}
h3 {font-size: 1.5em;}
h4 {font-size: 1.17em;}
h5 {font-size: 1.33em;}
h6 {font-size: 0.83em;}
p {
    margin-left: 1rem;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
    padding: 0;
    font-family: var(--font-base);
}
/*minor changes so it´ll look nicer*/
a { color: var(--accent1); }
a:hover { color: var(--crust1hover);}
img {
    filter: blur(0.4px); /*skedaddle skidoodle pixels be gone*/
}
ul, ol {
    font-family: var(--font-base);
}

/*=============== HEADER ================= */
/*this is basically a hero image*/
header {
    width: auto;
    overflow: hidden;
    height: 24rem;
    margin: -0.5rem;
}
header img {
    display: block;
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
}
/* ============== NAV BAR ================== */
/* important as hell, this shit makes the navbar look pretty,*/
nav {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: auto;
    padding: 0.75rem;
    margin: -0.5rem;
    background: var(--crust1);
}
.nav-links {
    align-self: center;
}
.nav-links a {
    padding: 1.25rem;
    font-family: var(--font-important);
    color: var(--base);
    text-decoration: none;
    font-size: 1.3em;
    background: var(--crust1);
    border-radius: 0.5rem;
}
.nav-links a:hover {
    background: var(--crust1hover);
    border-radius: 0.5rem;
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}
/*emergency logo styling i think!*/
nav img {
    height: 4.5em;
    padding-left: 1em;
}
.logo {
    padding: 0.2em 0.5em;
    font-family: Garamond, 'Times New Roman', serif;
    color: var(--base);
    font-size: 3em;
}


/*================== FOOTER =====================*/
/* contacts and shit go here */
/* TODO: footer is absolutely not finished so please finish it */
footer {
    display: flex;
    justify-content: space-evenly;
    padding: 0.75rem;
    margin: -0.5rem;
    margin-top: 2rem;
    background: var(--crust2);
}
footer .contacts {
    color: var(--base);
    font-size: 0.9rem;
}
footer .whitespace {
    width: 50%;
}
footer h4 {
    font-size: 1.33em;
    color: var(--base);
}

/*================== CONTENT ITSELF (i put it in a .showcase tag and now i know no better way to describe it) =====================*/
.showcase {
    overflow: hidden;
    padding: 1.25rem;
    width: 85%;
    max-width: 100%;
    margin: 1.25rem auto 0.5rem auto;
    background: var(--base);
    border-radius: 0.5rem;
}
/*respect the order, image first, content second (float just works like that)*/
img.float {
    float: right;
    max-width: 50%;
    height: auto;
    padding: 0;
    margin: 0.5rem;
}
.showcase-content {
    margin: -0.5rem;
    padding: 0;
}
.showcase-grid-content {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 1rem;
    padding: 0.625rem;
}
.showcase-grid-content div {
    margin: 0;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background-color: var(--mantle1);
}
.showcase-grid-content img {
    display: block;
    object-fit: cover;
    margin-left: auto;
    margin-right: auto;
    height: 30rem;
    border-radius: 0.5rem;
    width: 100%;
}

/* ========================== PRODUCTS GRID =================================== */
/*TODO: reformat product title a bit and just the WHOLE title in general!*/
.products {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 0.625rem;
}
.products-special {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 0.625rem;
}
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0; 
    padding-bottom: 0.625rem;
    border-radius: 0.5rem;
    background-color: var(--mantle1);
}
.product-card .footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    bottom: auto;
    padding: 0 0.5rem;
    margin: auto 0rem -0.5rem -0.5rem;
}
.product-card p {
    margin: 0rem 1rem 1rem 1rem; 
}
.products-special .product-card .footer {
    padding: 0 0.5rem 1rem 0.5rem;
}
/*TODO: WHY ISNT THIS BOLD*/
.title {
    padding-top: 0.5rem;
    font-family: var(--font-header);
    font-weight: bold;
}
.order { /*THIS IS AN <a> TAG STYLED LIKE A <button> TAG PLEASE DONT CRUCIFY ME*/
    position: relative;
    box-sizing: border-box;
    margin-left: 1rem;
    padding: 0.5rem;
    text-decoration: none;
    color: var(--accent2);
    background-color: var(--base);
    font-family: var(--font-important);
    border: 2px solid var(--accent1);
    border-radius: 0.5rem;
}
.order:hover { 
    transform: scale(1.05); 
    color: var(--accent2);
    background-color: var(--base);
}
.product-card img {
    display: block;
    object-fit: cover;
    box-sizing: border-box;
    width: 100%;
    height: 10rem;
    padding: 0;
    margin: 0;
    border-top-left-radius: 0.3rem;
    border-top-right-radius: 0.3rem;
}
.product-card h1, h2, h3, h4, h5, h6 { padding: 0 0.625rem; margin-bottom: 0.5rem; }
.price { /*can only be one line tall otherwise the whole thing looks squished*/
    display: inline-block;
    margin: 0.625rem;
    padding: 0.625rem;
    font-family: var(--font-important);
    font-size: 1rem;
    color: var(--base);
    background-color: var(--crust2);
    border-radius: 0.3rem;
}
/* hover effect oooooo (only on regular, the custom orders get borked) */
.products .product-card:hover { transform: scale(1.05); }
.error /*error message for the thing*/ {
    display: block;
    grid-column: 1 / span 5;
    font-family: var(--font-base);
    color: var(--base);
    border: 2px solid rgb(175, 50, 50);
    border-radius: 0.5rem;
    background-color: rgb(226, 78, 78);
}

/* ====================== MOBILE SPECIFIC STYLES ================================ */
@media screen and (max-width: 728px) {
    /* showcase to get rid of the gaps on the side */
    .showcase {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
    }
    .showcase-content {
        order: 1;
    }
    img.float {
        float: none;
        order: 2;
        padding-top: 1.5rem;
        margin: -0.5rem;
    }
    .showcase-grid-content {
        display: flex;
        flex-direction: column;
        grid-template-columns: unset !important;
        margin-top: 1rem;
    }
    .showcase-grid-content img {
        display: block;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }
    /*navbar fix*/
    nav {
        display: grid;
        grid-template-columns: auto 1fr auto;
    }
    .nav-links {
        display: none;
        width: 100%;
    }
    /* button! mobile only */
    .nav-toggle {
        display: block;
        grid-column: 3;
        flex-shrink: 0;
        font-size: 2rem;
        margin-left: auto;
        padding: 0 0.5rem 0.25rem 0.5rem;
        background: var(--crust1);
        color: var(--base);
        border-radius: 0.5rem;
    }
    .nav-toggle:active {
        background: var(--crust1hover);
        border-radius: 0.5rem;
    }
    /*button functionality i believe???*/
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 90%; 
        right: 0;
        width: 50%;
        background: var(--crust1);
    }
    .nav-links.active a {
        align-items: flex-start;
        padding: 1rem;
        border-bottom: 1px solid var(--base);
        border-radius: 0;
        background: none;
    }
    /*PRODUCTS PAGE*/
    .products { grid-template-columns: 1fr; }
    .products-special { grid-template-columns: auto; }
    /*contacts footer (it should go horizontal)*/
    footer { flex-direction: column; }
    footer .whitespace { display: none; }
}