body {
    background-color: #ffffff;
    font-family: 'Times New Roman', Times, serif;
    margin: 0;
}

.header {
    width: 100%;
    display: flex;
    flex-direction: row;
    background-color: #9c0909;
    color: #ffffff;
    padding-top: 3px;
    padding-bottom: 3px;
    align-items: center;
    
    position: sticky;
    top: 0;
    z-index: 1000;
}

.appName {
    margin-left: 100px;
}

.menu {
    margin-left: auto;
    margin-right: 100px;
}

.menuButton {
    margin-left: 50px;
    background-color: #9c0909;
    border: #9c0909;
    color: #ffffff;
    font-size: larger;
    font-family: 'Times New Roman', Times, serif;
    cursor: pointer;
}

.menuButton:hover {
    box-shadow: 0px 15px 20px rgba(0, 0, 0, 0.3);
}

.primaryButton {
    margin-top: 30px;
    background-color: #9c0909;
    border: #ffffff;
    padding: 8px 12px;
    color: #ffffff;
    border-radius: 8px;
    width: 300px;
    font-family: 'Times New Roman', Times, serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.primaryButton:hover {
    box-shadow: 0px 15px 20px rgba(0, 0, 0, 0.3);
}

.footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;     /* centers items horizontally */
    justify-content: center;
    text-align: center;
    margin-top: 50px;
    padding: 20px 0;
}

/* Shared wine-card sizing — used by both homepage and myReviews via displayReviews() in utils.js */
.wine .wineCardImage {
    width: auto;
    max-width: 80%;
    height: 140px;
    object-fit: contain;
    display: block;
    margin: 0.5rem auto;
}

.wine .wineImageStars img {
    width: 100px;
    height: auto;
    display: block;
    margin: 0.3rem auto;
}

.wineKeywords {
    font-style: italic;
    color: #666;
    margin: 0.2rem 0;
    text-align: center;
}

.wineDescription {
    text-align: center;
    margin: 0.4rem 0 0;
    max-width: 90%;
}

.wine {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 10px;
    margin-top: 30px;
    border: 2px solid #9c0909;
    border-radius: 8px;
    width: 100%;
    max-width: 300px;
    height: auto;
    padding: 15px;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wine:hover {
    box-shadow: 0 4px 16px rgba(156, 9, 9, 0.35);
    transform: translateY(-2px);
}

.placeYearDate {
    display: flex;
    justify-content: space-between;
    width: 90%;
}

.fullWine {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    border: 2px solid #9c0909;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 20px rgba(156, 9, 9, 0.3);
    padding: 2rem;
    padding-top: 3rem;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
}

.fullWineClose {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: 1.5px solid #9c0909;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    color: #9c0909;
    line-height: 1;
    padding: 0.2rem 0.45rem;
}

.fullWineClose:hover {
    background: #9c0909;
    color: white;
}

.fullWine h2 {
    margin: 0.3rem 0;
    text-align: center;
}

.fullWine .placeYearDate {
    width: 100%;
}

.fullWine .wineCardImage {
    max-width: 60%;
    max-height: 260px;
    object-fit: contain;
}

.fullWine .wineImageStars img {
    width: 160px;
    height: auto;
    display: block;
    margin: 0.3rem auto;
}

.fullWine p {
    margin: 0.2rem 0;
    text-align: center;
}

#backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
}

.hidden {
    display: none !important;
}

.siteTitle {
    cursor: pointer;
}

.heading {
    text-align: center;
    text-decoration: underline;
    text-decoration-color: #9c0909;
    margin-top: 30px;
}

/* ── Mobile & Responsive Styles ── */
@media (max-width: 768px) {

    /* Header: stack vertically */
    .header {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 0;
        gap: 6px;
    }

    .appName {
        margin-left: 16px;
    }

    .appName h1 {
        font-size: 1.4rem;
        margin: 0;
    }

    /* Nav: scrollable horizontal row */
    .menu {
        margin: 0;
        width: 100%;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 4px 10px 6px;
        gap: 0;
        box-sizing: border-box;
    }

    .menu::-webkit-scrollbar { display: none; }

    .menuButton {
        margin-left: 0;
        margin-right: 6px;
        font-size: 0.85rem;
        white-space: nowrap;
        padding: 4px 8px;
        flex-shrink: 0;
    }

    /* Primary button full-width */
    .primaryButton {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin-top: 16px;
    }

    /* Wine cards: full-width on mobile */
    .wine {
        max-width: 100%;
        width: calc(100% - 32px);
        margin: 8px 0;
    }

    .fullWine {
        width: 88%;
        max-width: 88%;
        padding: 1rem;
        padding-top: 2.8rem;
        max-height: 78vh;
    }

    .footer {
        margin-top: 30px;
        padding: 16px 0;
    }
}


