@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

* {
    font-family: "Open Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: normal;
    font-style: normal;
    font-variation-settings: "wdth" 100;
}

body {
    background: #709ac70f;
    margin: 0;
}

.srOnly {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

#navbar {
    width: 100%;
    height: 44px;
    font-weight: 500;
    font-size: 22px;
    color: #464457;
    background: white;
    padding: 5px 15px;
    margin: 0;
    position: fixed;
    z-index: 999;
    box-shadow: 0px 0px 20px 5px whitesmoke;
}

#navbar a {
    color: inherit;
    text-decoration: none;
}

#top_padding {
    padding-top: 60px;
}

h1, h2 {
    font-size: 18px;
    margin: auto;
    text-align: center;
    color: rgb(0 0 0 / 75%);
}

h1 {
    padding: 20px 0 10px;
}

h2 {
    padding: 0 0 40px;
}

/* Hero */
.heroTitle, .heroSub {
    max-width: 760px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}

.heroTitle {
    font-size: clamp(26px, 5vw, 40px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: #1f1d2b;
    padding-top: 32px;
    padding-bottom: 12px;
}

.heroSub {
    font-size: clamp(15px, 2.5vw, 18px);
    color: #5c5a6b;
    padding-bottom: 28px;
}

/* Email signup */
#emailSignupForm {
    background: white;
    margin: 0 auto 40px;
    width: calc(100% - 32px);
    max-width: 520px;
    padding: 20px 24px 22px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 5px 5px 20px 0 #8080802e;
}

.signupTitle {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
    font-weight: 700;
    color: #1f1d2b;
}

.signupBlurb {
    margin: 0 0 16px;
    font-size: 14px;
    color: #5c5a6b;
}

.signupFields {
    display: flex;
    gap: 8px;
}

.signupFields input {
    flex: 1;
    min-width: 0;
    padding: 11px 12px;
    font-size: 16px; /* 16px stops iOS from zooming on focus */
    border: 1px solid rgb(0 0 0 / 30%);
    border-radius: 8px;
}

.signupFields button {
    padding: 11px 20px;
    border: none;
    border-radius: 8px;
    background: #464457;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.signupFields button:hover {
    background: #34324a;
}

.signupFields button:disabled {
    opacity: 0.6;
    cursor: default;
}

.signupFields input:focus-visible,
.signupFields button:focus-visible {
    outline: 2px solid #464457;
    outline-offset: 2px;
}

.signupStatus {
    min-height: 1.3em;
    margin: 10px 0 0;
    font-size: 14px;
    color: #5c5a6b;
}

.signupStatus.error {
    color: #b42318;
}

#emailSignupForm.signedUp .signupBlurb,
#emailSignupForm.signedUp .signupFields {
    display: none;
}

#emailSignupForm.signedUp .signupStatus {
    margin-top: 0;
    font-size: 16px;
    font-weight: 600;
    color: #067647;
}

@media (max-width: 480px) {
    .signupFields {
        flex-direction: column;
    }
}

/* Price drop cards */
.priceDrops {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 24px;
    padding: 0 16px;
}

.dropCard {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: white;
    color: inherit;
    text-decoration: none;
    border: 1px solid rgb(0 0 0 / 5%);
    border-radius: 10px;
    box-shadow: 0 2px 12px #8080802e;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dropCard:hover, .dropCard:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px #80808040;
}

.dropCard:focus-visible {
    outline: 2px solid #464457;
    outline-offset: 2px;
}

.cardImage {
    position: relative;
    aspect-ratio: 4 / 5;
    background: #f2f2f5;
}

.cardImage > .boxImage {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropBadge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 9px;
    border-radius: 999px;
    background: #d92d20;
    color: white;
    font-size: 13px;
    font-weight: 700;
}

.cardBody {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px 12px;
}

.cardBody > p {
    margin: 0;
}

.itemBrand {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b6b78;
}

.itemName {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #1f1d2b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cardPrices {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.currentPrice {
    font-size: 16px;
    font-weight: 700;
    color: #1f1d2b;
}

.priorPrice {
    font-size: 13px;
    color: #6b6b78;
}

.itemDescription {
    font-size: 12px;
    line-height: 1.35;
    color: #6b6b78;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 480px) {
    .priceDrops {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 10px;
    }

    .cardBody {
        padding: 8px 10px 10px;
    }

    .itemName {
        font-size: 13px;
    }
}

#searchSortForm {
    /*border: 1px solid red;*/
    width: 720px;
    height: auto;
    margin: auto;
    margin: auto;
    padding-left: 20px;
    z-index: 1;
    margin-top: 60px;
}

#searchSortForm > #searchTextInput {
    width: 680px;
    border: 1px solid whitesmoke;
    border-radius: 5px;
    padding: 5px;
}

.formInputGroup {
    /*border: 2px solid red;*/
    display: flex;
    margin: auto;
    float: left;
    font-size: 14px;
    align-items: center;
}

.formInputGroup > label {
    padding: 0 5px;
}

/* Recently seen items (small image tiles) */
.itemSnapshots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 1100px;
    margin: 24px auto 0;
    padding: 0 16px;
    text-align: center;
}

.itemSnapshot {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid whitesmoke;
    border-radius: 5px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 5px 5px 20px 0 #8080802e;
    z-index: 0;
}

.itemSnapshots > .itemSnapshot > .url {
    text-wrap: wrap;
}

.itemSnapshot > img {
    max-width: 100%;
    max-height: 100%;
}

.itemSnapshot > p {
    position: absolute;
    border-radius: 0px 5px;
    padding: 0px 7px;
    margin: auto;
    bottom: 0;
    left: 0;
    background: rgb(255 255 255 / 80%);
    color: black;
    font-weight: bold;
}

@media (max-width: 480px) {
    .itemSnapshots {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 0 10px;
    }
}

.pageNavigationDiv {
    display: flex;
    width: 100px;
    margin: auto;
    padding-top: 20px;
}

.pageNavigation {
    margin: auto;
    display: flex;
}

#prevPageButton, #nextPageButton {
    border: none;
    background: transparent;
    color: rgb(0 0 0 / 80%);
}

#prevPageButton, #nextPageButton:hover {
    cursor: pointer;
    transform: scale(1.05);
}

footer {
    height: 150px;
}

.priceDrop {
    color: #FF4136 !important;
}

#opaqueBackground {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;
    background: rgb(235 235 235 / 75%);
    display: flex;
}

#modal {
    background: white;
    display: table;
    padding: 30px 25px;
    border-radius: 5px;
    margin: auto;
    text-align: center;
    position: relative;
    color: white;
    border: 1px solid rgb(128 128 128 / 25%);
    box-shadow: 0px 0px 20px rgb(128 128 128 / 25%);
}

#modal_msg {
    color: rgb(0 0 0 / 75%);
}

#close_btn {
    margin-top: 30px;
    border: none;
    background: transparent;
    color: rgb(0 0 0 / 60%);
}

#close_btn:hover {
    cursor: pointer;
}

.priceDropDate {
    width: calc(100% - 32px);
    max-width: 600px;
    padding: 10px 0;
    margin: 20px auto 16px;
    background: white;
    border-radius: 5px;
    box-shadow: 5px 5px 20px 0 #8080802e;
    border: 1px solid whitesmoke;
    font-weight: bold;
    font-size: 16px;
    color: #464457;
}
