/*CSS document*/

html, body, div, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit;}

body {
    background-color: var(--white);
    font-family: "indivisible-variable", sans-serif;
    font-variation-settings: "wght" 500;
    color: var(--black);
}

a { text-decoration: none; }

img { max-width: 100%; display: block; }

html, body { 
    height: 100%; 
    overflow-x: clip;
    overflow-y: auto;
    scrollbar-width: none;
}

:root {
    --lightPink: rgb(255, 220, 240);
    --dark-blue: rgb(0 , 80, 200);
    --light-blue: rgb(0 , 120, 255);
    --true-white: rgb(255, 255, 255);
    --white:rgb(246, 246, 248);
    --less-white:rgb(240, 240, 242);
    --black: rgb(22, 22, 24);
    --black-30: rgb(30, 30, 32);
    --black-40: rgb(40, 40, 42);
    --black-60: rgb(60, 60, 62);
    --black-100: rgb(100, 100, 102);
    --gray: rgb(160, 160, 162);
    --gray120: rgb(120, 120, 122);
    --gray180: rgb(180, 180, 182);
    --gray200: rgb(200, 200, 202);
    --graph-gray: rgb(220, 220, 222);
    --light-green: rgb(200, 255, 200);
    --dark-green: rgb(40, 120, 80);
    --light-purple: rgb(220, 200, 255);
    --dark-purple: rgb(50, 0, 120);
    --orange: rgb(255, 120, 40);
    --green: rgb(0, 200, 120);
    --blue: rgb(80, 120, 255);
    --red: rgb(255, 80, 120);
}

header, footer {
    letter-spacing: -.02rem;
}

div.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

header {
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 .2rem 1rem rgba(100, 100, 102, 0.2);
    padding: 0 2rem;

    background: rgba(246, 246, 248, .6);
    backdrop-filter: blur(.6rem);
    -webkit-backdrop-filter: blur(.6rem);
}

nav ul {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    list-style: none;
    max-width: 72rem;
    margin: 0 auto;
}

nav ul li {
    flex: 1;
    text-align: center;
    transition: box-shadow .2s ease;
    border-radius: .4rem;
}

nav ul li:hover {
    box-shadow: .6rem .6rem 0 0 var(--black);
}

nav a {
    color: var(--black);
    display: block;
    padding: 1rem;
}

nav li:hover a {
    color: var(--white);
    font-variation-settings: "wght" 600;
}

.homenav:hover { background-color: var(--blue); }
.flavornav:hover { background-color: var(--red); }
.contactnav:hover { background-color: var(--green); }
.ordernav:hover { background-color: var(--orange); }


main {
    flex: 1 1 auto;

    flex-direction: column;
    justify-content: center;
    margin-bottom: 1rem;
}

main .top {
    display: flex;
    font-size: 6rem;
    letter-spacing: -.02em;
    max-width: 72rem;
    margin: 4rem auto;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

main .topFlav, main .topCont {
    display: flex;
    font-size: 6rem;
    letter-spacing: -.02em;
    max-width: 72rem;
    margin: 4rem auto;
    align-items: center;
    justify-content: space-between;
}

main .bottom {
    font-variation-settings: "wght" 400;
    letter-spacing: -.02em;
    max-width: 36rem;
    margin: 6rem auto 2rem;
    line-height: 1.4rem;
    padding: 0 2rem;
}

.topCont, .topFlav, .location {
    padding: 0 2rem;
}

main .bottom .words {
    align-self: end;
}

.words h2, .location h2 {
    font-variation-settings: "wght" 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

main .bottom img {
    max-height: 14rem;
    margin: 4rem auto 0;
}

main .top img, main .topFlav img, main .topCont img {
    max-height: 8rem;
}

main .top h2, main .topFlav h2, main .topCont h2 {
    font-variation-settings: "wght" 900
}

.flavors {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 2rem;
    max-width: 74rem;
    margin: 4rem auto 0;
    padding: 0 1rem;
}

.item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    row-gap: .6rem;
    margin-bottom: 2rem;
    overflow: hidden;
    transition: box-shadow .2s ease;
    border-radius: .4rem;
    padding: 1rem;
}

.flavors .itemImg {
    grid-column: 1 / -1;
    border-radius: .4rem;
    overflow: hidden;
    position: relative;
}

.flavors img {
    width: 100%;
    height: 10rem;
    object-fit: cover;
    object-position: center;
    justify-self: center;
    border-radius: .4rem;
    transition: .2s ease;
}

.item:hover .item-controls {
    opacity: 1;
    pointer-events: auto;
}

.item-controls[data-qty]:not([data-qty="0"]) {
    opacity: 1;
    pointer-events: auto;
}

.item:hover img {
    transform: scale(1.04);
}

.item-controls {
    position: absolute;
    top: .4rem;
    right: .4rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    background: var(--black);
    color: var(--white);
    padding: .2rem;
    border-radius: 100rem;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.item-btn {
    background-color: var(--white);
    color: var(--black);
    border: none;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.6rem;
    padding: 0 0 .3rem 0;
    font-variation-settings: "wght" 700;
}

.item-count {
    min-width: 1.4rem;
    text-align: center;
    font-variation-settings: "wght" 700;
}

.item-price {
    margin-left: 1rem;
}

.item-controls[data-qty="0"] .item-minus {
    display: none;
}

.item:hover {
    box-shadow: .6rem .6rem 0 0 var(--black);
    background-color: var(--lightPink);
}

.flavors .flavor {
    grid-column: 1/2;
    grid-row: 2/3;
    font-size: 1.2rem;
    font-variation-settings: "wght" 700;
}

.flavors .price {
    grid-column: 2/3;
    grid-row: 2/3;
    font-size: 1.2rem;
    font-variation-settings: "wght" 700;
    text-align: right;
}

.flavors .description {
    grid-column: 1/-1;
    font-variation-settings: "wght" 400;
}

.contact {
    max-width: 76rem;
    margin: 4rem auto;
}

.contact h1 {
    font-size: 3rem;
    font-variation-settings: "wght" 900;
    margin-bottom: 2rem;
}

.location {
    margin: 6rem auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 4rem;
}

.location .phone { grid-column: 2/3; }
.location .email { grid-column: 3/4; }
.location .hours { grid-column: 1/2; }

.location img { 
    grid-column: 1 / -1; 
    margin-top: 4rem;
    width: 100%;
    
    height: auto;
    max-height: calc(100vh - 42rem);
    
    object-fit: cover;
    object-position: top;
    justify-self: center;
    border-radius: .4rem;
}

.location br {
    margin-bottom: .2rem;
}

.checkout-container {
    max-width: 72rem;
    margin: 6rem auto 0;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 4rem;
}

.checkout-section {
    margin-bottom: 6rem;
}

.checkout-section h2 {
    font-size: 1.2rem;
    font-variation-settings: "wght" 700;
    margin-bottom: 1rem;
}

.order-item, .order-total {
    display: grid;
    grid-template-columns: 1fr auto auto;
    /* gap: 1rem; */
    padding: .4rem 0;
    border-bottom: 1px solid var(--graph-gray);
}

.item-qty { 
    margin-right: 1rem; 
}

.order-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
}

.order-item .item-price {
    text-align: right;
}

.order-total {
    font-size: 1.2rem;
    font-variation-settings: "wght" 700;
    border-top: 2px solid var(--black);
    border-bottom: none;
    margin-top: 1rem;
    padding-top: 1rem;
}

label {
    display: block;
    margin-bottom: 1rem;
    padding-right: 1.4rem;
}

input {
    width: 100%;
    padding: .6rem;
    border-radius: .4rem;
    border: 1px solid var(--graph-gray);
    font-size: 1rem;
    margin: .2rem 0;
    color: var(--black-100);
}

.payment-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
}

.place-order-wrapper {
    position: relative;
    display: block;
    grid-column: 3/4;
}

.place-order {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    border: none;
    border-radius: .4rem;
    cursor: pointer;
    transition: box-shadow .2s ease;
    background-color: var(--blue);
    color: var(--white);
    font-variation-settings: "wght" 600;

    position: relative;
    z-index: 2;
    overflow: visible;
}

.place-order:hover {
    background: var(--lightPink);
    color: var(--black);
    box-shadow: .6rem .6rem 0 0 var(--black);
    border: none;
}

.place-order-wrapper::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12rem;
    height: 12rem;

    transform: translate(-50%, -50%);
    transform-origin: center center;

    background: url("star.svg") center / contain no-repeat;
    opacity: 0;
    pointer-events: none;
    z-index: 1;

    animation: spinStar 4s linear infinite;
    transition: opacity 0.2s ease;
}

.place-order-wrapper:hover::before {
    opacity: 1;
}

@keyframes spinStar {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}


.checkout-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .2rem;
}

.checkout-btn {
    background-color: var(--graph-gray);
    color: var(--black);
    border: none;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 0 .2rem 0;
    font-variation-settings: "wght" 600;
}

.checkout-count {
    min-width: 1.4rem;
    text-align: center;
    font-variation-settings: "wght" 600;
}

.checkout-controls,
.checkout-btn,
.item-controls,
.item-btn {
    user-select: none;
}

img[src="cow.svg"] {
    transform-origin: center;
    animation: none;
}

img[src="cow.svg"]:hover {
    animation: cowSpin 4s linear infinite;
}

@keyframes cowSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

footer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    box-shadow: 0 -.2rem 1rem rgba(100, 100, 102, 0.2);
    padding: 0 2rem;

    background: rgba(246, 246, 248, .6);
    backdrop-filter: blur(.6rem);
    -webkit-backdrop-filter: blur(.6rem);
}

.footer {
    max-width: 72rem;
    margin: 1rem auto;
}

.spanfooter {
    font-variation-settings: "wght" 400
}

@media (max-width: 56rem) {

    .checkout-container {
        display: flex;
        flex-direction: column;
        margin: 0 1rem;
    }

    .checkout-section {
        margin: 0 0 4rem;
    }

    .place-order {
        margin-bottom: 4rem;
    }

}

@media (max-width: 50rem) {

    main .top, main .topFlav, main .topCont {
        font-size: 5rem;
    }

    .flavors {
        grid-template-columns: 1fr 1fr;
        column-gap: .6rem;
    }

    .location {
        display: flex;
        flex-direction: column;
    }

    .location div {
        margin-bottom: 4rem;
    }

    .location img {
        display: none;
    }

}

@media (max-width: 44rem) {

    main .top, main .topFlav, main .topCont {
        font-size: 4rem;
    }

}

@media (max-width: 38rem) {

    main .top, main .topFlav, main .topCont {
        font-size: 3rem;
    }

}

@media (max-width: 30rem) {

    main .top img, main .topFlav img, main .topCont img {
        max-height: 6rem;
    }

    .flavors {
        grid-template-columns: 1fr;
    }

}
