:root {
    --blue: #507895;
    --darkblue: #3a5c72;
    --lightgreen: #8fb871;
    --green: #7ead5c;
    --clay: #cb8b7d;
    --lightclay: #d6a499;
    --darkclay: #bf705f;
    --text: #333333;
    --black: #000000;
    --white: #ffffff;
    --offwhite: #f5f5f5;
    --error: #d32f2f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

* a {
    color: var(--text);
    text-decoration: none;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

body {
    background-color: var(--offwhite);
    color: var(--text);
    line-height: 1.5;
}

*::-webkit-scrollbar {
    display: none;
}

header {
    background-color: var(--blue);
    color: var(--white);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.1);
}

.page-title {
    padding: 15px 20px;
    text-align: center;
}

.page-title h1 {
    font-size: 1.6rem;
    font-weight: 600;
}

.top-nav {
    background-color: var(--darkblue);
    padding: 10px 20px;
}

.top-nav-items {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.top-nav-items a {
    color: var(--white);
    font-size: 1rem;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.top-nav-items a:hover {
    background-color: var(--blue);
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: 124px 0 0 0;
    justify-self: center;
}

.card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: row;
    gap: 20px;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.product a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}

.product a:hover {
    color: var(--darkblue);
}

.info.card, .product.card {
    align-items: center;
}

.centered-card {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.vertical-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.status-image {
    max-width: 100px;
    height: auto;
    margin-bottom: 20px;
}

.left-half, .right-half {
    flex: 1;
}

.left-half h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.left-half p {
    font-size: 1.1rem;
}

.right-half img, .left-half img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.product-preview.card {
    flex-direction: column;
    text-align: center;
}

.top-half img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.bottom-half h2 {
    font-size: 1.5rem;
    margin: 10px 0;
}

.bottom-half p {
    font-size: 1rem;
    color: var(--text);
}

.button {
    background-color: var(--green);
    color: var(--white);
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block;
    margin: 10px 0;
    text-decoration: none;
}

.button:hover {
    background-color: var(--lightgreen);
    color: var(--white);
}

.button.secondary {
    background-color: var(--clay);
    color: var(--text);
}

.button.secondary:hover {
    background-color: var(--lightclay);
    color: var(--text);
}

.price {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 10px 0;
}

.terms-container {
    margin: 20px 0;
    width: 100%;
}

.terms-container textarea {
    width: 100%;
    height: 400px;
    padding: 10px;
    border: 1px solid var(--black);
    border-radius: 8px;
    margin-bottom: 10px;
    resize: none;
}

footer {
    background-color: var(--clay);
    padding: 15px 20px;
    text-align: center;
}

footer nav {
    display: flex;
    justify-content: center;
    gap: 20px;
}

footer nav a {
    color: var(--text);
    font-size: 1rem;
    text-decoration: none;
}

footer nav a:hover {
    color: var(--blue);
}

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

    .left-half, .right-half {
        width: 100%;
    }

    .page-title h1 {
        font-size: 1.6rem;
    }

    .top-nav-items {
        gap: 5px;
    }

    .product-list {
        grid-template-columns: 1fr;
    }
}

.alert {
    color: var(--error);
    font-weight: bold;
}