/* Reset some default browser styles */
html, body {
    height: auto;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
    margin: 20px;
    border: 5px double #91bdec;
    border-radius: 15px;
    padding: 20px;
    background-color: #f4f9f9;
    color: #5a5a5a;
    box-sizing: border-box;
}

.cart-status-button {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1000;
    padding: 12px 16px;
    border: 1px solid #6091bb;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.96);
    color: #3a5f7d;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 10px 24px rgba(58, 95, 125, 0.16);
    cursor: pointer;
    backdrop-filter: blur(6px);
}

.cart-status-button:hover {
    background-color: #ffffff;
}

@media (min-width: 900px) {
    .cart-status-button {
        display: none;
    }
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    box-sizing: border-box;
}

header, main, footer {
    padding: 1em;
}

main {
    display: block;
}

.logo {
    width: 80%;
    max-width: 700px;
    height: auto;
    margin: 0 auto;
    cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
    color: #3a5f7d;
}

p, a {
    color: #3a5f7d;
    font-size: 18px;
    font-weight: 400;
}

a {
    color: #1a659e;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Navigation Styles */
nav {
    display: flex;
    justify-content: center;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 10px;
}

nav ul li {
    margin: 0;
}

/* Button styles */
.button {
    display: inline-block;
    width: 150px;
    padding: 10px;
    text-align: center;
    background-color: #91bdec;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: bold;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.button:hover {
    background-color: #6091bb;
}

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

/* Product styles */
.product-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.product-image {
    flex: 0 0 auto;
    width: 200px;
    margin-right: 20px;
}

.product-info {
    flex: 1;
    padding: 10px;
    text-align: left;
}

.cart {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #91bdec;
    border-radius: 12px;
    background-color: #ffffff;
    text-align: left;
    box-sizing: border-box;
}

.cart h2 {
    margin-top: 0;
}

#cart-items p {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

#cart-items p button {
    margin-top: 0;
}

#checkout-button {
    width: 100%;
    margin-top: 10px;
}

/* Vendors Section */
.vendors {
    margin: 40px 0;
}

.vendor-list {
    list-style-type: none;
    padding: 0;
    margin: 20px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.vendor-list li {
    font-weight: 700;
    color: #3a5f7d;
}

/* Larger screens: display vendors in a row and insert delimiter */
@media (min-width: 600px) {
    .vendor-list {
        flex-direction: row;
        justify-content: center;
        gap: 0; /* we will handle spacing with delimiter */
    }

    .vendor-list li {
        display: inline-flex;
        align-items: center;
        padding: 0 15px;
    }

    .vendor-list li:not(:last-child)::after {
        content: "\2022"; /* bullet */
        color: #6091bb;
        font-size: 1.2em;
        margin-left: 15px;
    }
}

@media (min-width: 900px) {
    .products-page main {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 32px;
        align-items: start;
    }

    .products-page .products {
        grid-column: 1;
    }

    .products-page .cart {
        grid-column: 2;
        position: sticky;
        top: 24px;
        margin-top: 0;
        align-self: start;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        margin: 14px;
        padding: 16px;
    }

    .about-section {
        flex-direction: column;
        align-items: center;
    }
    .about-image {
        max-width: 80%;
        margin-right: 0;
        margin-bottom: 20px;
    }
    .about-text {
        max-width: 100%;
    }
    .container {
        padding: 20px;
    }

    nav {
        padding: 10px 20px;
    }

    nav ul {
        margin: 20px 0;
        gap: 30px;
    }

    nav ul li a {
        color: #3a5785;
        font-weight: bold;
    }

    nav ul li a:hover {
        color: #1a396a;
    }

    h1 {
        margin-top: 0;
        font-size: 24px;
    }

    h2 {
        font-size: 22px;
    }

    p, a {
        font-size: 16px;
    }

    .contact p, .contact a {
        word-break: break-word;
    }

    .product-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .product-image {
        width: 100%;
        max-width: 300px;
        margin: 0 auto 15px;
    }

    .product-info {
        text-align: center;
        padding: 0;
    }

    .button {
        width: 100%;
        max-width: 300px;
        margin: 10px auto;
    }

    .cart-status-button {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 12px 14px;
        font-size: 15px;
    }

    .cart {
        margin-top: 24px;
        padding: 16px;
    }

    #cart-items p {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }

    #cart-items p button {
        width: 100%;
    }
}

/* --- Header nav buttons spacing (especially mobile) --- */
nav ul { 
    flex-wrap: wrap;           /* allow wrapping instead of cramming */
    gap: 12px 16px;            /* row gap / column gap */
}

/* Keep product-page .button behavior, but make HEADER nav buttons not full-width on mobile */
@media (max-width: 768px) {
    header nav .button {
        width: auto;             /* don't stretch full width */
        max-width: none;
        margin: 0;               /* spacing handled by gap */
        padding: 10px 14px;      /* comfy tap target */
    }
}
