/* THEME AND IMPORTS */
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700&family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

/* RESET AND BASE STYLES */
* {
    /* makes sizeable predictable, padding and margin included in the width*/
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    font-family: Raleway, sans-serif;
}

html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

/* SITE LAYOUT */
main {
    display: flex;
    flex-direction: column;
    position: relative;
    margin-left: 0;
    width: 100%;
    padding: 10px 10px 10px 120px;
    flex: 1;
}

aside a {
    text-decoration: none;
    color: black;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.content {
    display: flex;
    width: 100%;
    max-width: 100%;
    justify-content: center;
    align-items: center;
}

footer {
    width: 100%;
    position: relative;
    margin-left: 0;
    margin-top: auto;
    margin-bottom: 5px;
    padding-left: 110px;
    display: flex;
    justify-content: center;
    height: 50px;
    border-top: 2px solid #02734A;
    flex-shrink: 0;
}

footer a {
    color: #111;
    text-decoration: none;
}

.contact {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* NAVIGATION AND HEADER */
header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    inset: 0px;
    width: 110px;
    z-index: 1;
    border: none;
    background-color: #02734A;
}

nav {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#logo {
    display: flex;
    justify-content: center;
    position: relative;
    top: 0px;
    width: 100%;
    border-bottom: 1px solid black;
    padding: 2px;
}

#logo a {
    text-align: center;
    font-size: 0.4rem;
    text-decoration: none;
}

#logo img {
    width: auto;
    height: 50px;
    margin: 5px;
}

#logo span {
    margin-top: 0;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 0.8rem;
    color: #ffffff;
}


nav ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

nav ul li {
    display: flex;
    flex-direction: column;
    align-items: center;
    list-style: none;
    margin-top: 24px;
    margin-bottom: 24px;
    gap: 8px;
}

nav ul a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 90px;
    padding: 5px;
}

nav ul a:hover {
    background-color: #015a38;
    border-radius: 12px;
}

nav ul form {
    margin: 0;
}

nav ul img {
    width: auto;
    height: 34px;
}

nav ul span {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 400;
    margin: 5px;
}

.logout-link {
    display: flex;
    align-items: center;
    background: none;
    color: white;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: Raleway, sans-serif;
}

.logout-link:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

/* SEARCH AND FILTER AREA */
#search_box {
    width: 100%;
    margin: 10px 0 20px 0;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background-color: #E6F2ED;
    border: 1px solid #c8ded5;
    border-radius: 14px;
}

.search_input_wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: white;
    border: 2px solid transparent;
    border-radius: 999px;
    padding: 0 16px;
    min-height: 46px;
}

.search_input_wrapper:focus-within {
    border-color: #02734A;
}

.search_icon {
    font-size: 1.1rem;
}

#search {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: Raleway, sans-serif;
    background: transparent;
}

.sort_wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.sort_wrapper label {
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
}

#sort,
#filterByCategory {
    min-height: 46px;
    border: none;
    border-radius: 999px;
    padding: 0 14px;
    font-size: 0.95rem;
    font-family: Raleway, sans-serif;
    background-color: white;
    cursor: pointer;
}

#sort:focus {
    outline: 2px solid #02734A;
}


/* HOME PAGE CONTENT AND PRODUCT CARDS */
.main {
    justify-content: flex-start;
    align-items: stretch;
}

.content_container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.banner {
    width: 100%;
    position: relative;
    margin-bottom: 8px;
}

.banner_track {
    position: relative;
    min-height: 280px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #e6f2ed, #cfe5db);
    border: 1px solid #c8ded5;
}

.banner_slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
}

.banner_slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.banner_slide img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
}

.banner_overlay {
    position: absolute;
    left: 24px;
    bottom: 24px;
    max-width: 420px;
    padding: 18px 20px;
    border-radius: 18px;
    background-color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(200, 222, 213, 0.95);
}

.banner_eyebrow {
    margin-bottom: 8px;
    color: #02734A;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.banner_overlay h2 {
    margin-bottom: 10px;
    color: #1f2e35;
    font-size: 1.9rem;
    line-height: 1.1;
}

.banner_overlay p {
    color: #31444c;
    line-height: 1.5;
}

.banner img {
    display: block;
}

.banner_controls {
    position: absolute;
    right: 20px;
    bottom: 20px;
    display: flex;
    gap: 10px;
}

.banner_button {
    border: none;
    border-radius: 999px;
    background-color: #02734A;
    color: white;
    padding: 10px 16px;
    font-family: Raleway, sans-serif;
    font-weight: 600;
    cursor: pointer;
}

.banner_button:hover {
    background-color: #015a38;
}

#article-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 18px;
    width: 100%;
    margin-top: 20px;
    padding: 0;
}

#article-box article {
    flex: 1 1 280px;
    min-width: 240px;
    max-width: 300px;
    background-color: white;
    border: 1px solid #e7ece8;
    border-radius: 18px;
    padding: 16px;
    margin: 0;
    box-shadow: 0 10px 30px #0000000d;
    transition: transform 0.01s ease, box-shadow 0.01s ease;
}

#article-box article:hover {
    border-color: #02734A;
    box-shadow: 0 16px 34px #00000014;
    transform: scale(1.02);
}

#article-box a {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    text-decoration: none;
    color: #111;
}

#article-box a h3 {
    margin-top: 12px;
    margin-bottom: 12px;
    font-family: Raleway, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: #1f2e35;
}

#article-box a p {
    color: rgb(113, 111, 111);
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background-color: #f7fbf8;
    border-radius: 14px;
    border: 1px solid #e7ece8;
    padding: 12px;
}

.product-prices {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding: 8px;
    background-color: #eef7f2;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 8px;
    border-radius: 12px;
    background-color: white;
    border: 1px solid #c8ded5;
}

.store-image {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.product-price span {
    font-family: Inter, Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f1f24;
    white-space: nowrap;
}

#button-container {
    padding: 1rem 0;
    display: flex;
    justify-content: center;
}

#load-more-products {
    background-color: #02734A;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
}

#load-more-products:hover {
    background-color: #015a38;
}

.delete-wishlist-form {
    margin-top: 12px;
}

.delete-wishlist-button {
    background-color: transparent;
    color: #c12626;
    border: 1px solid #c12626;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
}

.delete-wishlist-button:hover {
    background-color: rgba(193, 38, 38, 0.1);
}

#load-more-products:hover {
    background-color: #02603a;
}

.remove-item-button {
    background-color: transparent;
    color: #c12626;
    border: 1px solid #c12626;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.9rem;
}

.remove-item-button:hover {
    background-color: rgba(193, 38, 38, 0.08);
}

.quantity-input {
    width: 72px;
    padding: 6px 8px;
    border: 1px solid #c8ded5;
    border-radius: 6px;
}

.update-quantity-button {
    background-color: #02734A;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    margin-left: 8px;
    cursor: pointer;
    font-weight: 600;
}

.update-quantity-button:hover {
    background-color: #015a38;
}

.no_results {
    width: 100%;
    text-align: center;
    padding: 30px;
    color: #555;
    font-weight: 600;
}

/* SHOPPING LIST PAGE */
.shoppinglist {
    justify-content: flex-start;
    align-items: stretch;
    gap: 15px;
}

#current-shoppinglist {
    color: #02734A;
    font-size: 2rem;
    margin-bottom: 10px;
    border-bottom: 2px solid #02734A;
    padding-bottom: 10px;
}

.wishlist-create,
.wishlist-tabs,
.shoppinglist-empty-state,
.flash-messages {
    width: 100%;
    background-color: #E6F2ED;
    border: 1px solid black;
    border-radius: 10px;
    padding: 15px;
}

.wishlist-create h3,
.wishlist-tabs h3 {
    color: #02734A;
    margin-bottom: 10px;
}

#create-wishlist-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

#create-wishlist-form label {
    font-weight: 600;
    color: #02734A;
}

#create-wishlist-form input {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 1px solid black;
    border-radius: 5px;
    font-family: Raleway, sans-serif;
}

#create-wishlist-form button {
    background-color: #02734A;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-family: Raleway, sans-serif;
    font-weight: 600;
}

#create-wishlist-form button:hover {
    background-color: #015a38;
}

.form-error {
    width: 100%;
    color: red;
    font-size: 0.9rem;
}

.wishlist-tabs ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
}

.wishlist-tabs a {
    display: block;
    color: #02734A;
    background-color: white;
    border: 1px solid black;
    border-radius: 5px;
    padding: 8px 12px;
    text-decoration: none;
    font-weight: 600;
}

.wishlist-tabs a:hover,
.wishlist-tabs a.active-wishlist {
    background-color: #02734A;
    color: white;
}

.shoppinglist-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.shoppinglist-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border: 1px solid black;
}

.shoppinglist-table th {
    background-color: #02734A;
    color: white;
}

.shoppinglist-table th,
.shoppinglist-table td {
    border: 1px solid black;
    padding: 10px;
    text-align: left;
}

.shoppinglist-table a {
    color: #02734A;
    font-weight: 600;
    text-decoration: none;
}

.shoppinglist-table a:hover {
    text-decoration: underline;
}

.shoppinglist-table .store-image {
    width: 34px;
    height: 34px;
}

.shoppinglist-table tr:last-child {
    background-color: #E6F2ED;
    font-weight: 600;
}

.shoppinglist-empty-state {
    text-align: center;
}

/* PROFILE PAGE */
.profile-content h2 {
    color: #02734A;
    font-size: 2rem;
    margin-top: 5px;
    margin-bottom: 10px;
    border-bottom: 2px solid #02734A;
    padding-bottom: 10px;
    padding-top: 10px
}

.profile-content {
    display: flex;
    flex-direction: column;
    max-width: 920px;
    margin: 0 auto;
    padding: 22px;
    gap: 18px;
    background-color: #e9f3eb;
    border-radius: 18px;
    border: 1px solid #c8ded5;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.06);
}

.profile-content section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background-color: white;
    border: 1px solid #dfe6e1;
    border-radius: 16px;
    padding: 18px;
}

.profile-content h2 {
    color: #02734A;
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

.profile-content p {
    font-size: 1rem;
    line-height: 1.5;
    color: #111;
    margin: 0;
}

.profile-content button {
    background-color: #02734A;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    margin-left: 10px;
    cursor: pointer;
    font-weight: 600;
}

.profile-content button:hover {
    background-color: #015a38;
}

.profile-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #dfe6e1;
    border-radius: 12px;
    background-color: white;
}

.profile-content li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #dfe6e1;
    font-size: 1rem;
    color: #111;
}

.profile-content li:last-child {
    border-bottom: none;
}

.profile-content a {
    color: #02734A;
    text-decoration: none;
    font-weight: 600;
}

/* PRODUCT PAGE */
.product_page {
    display: flex;
    flex-direction: column;
    max-width: 1020px;
    margin: 0 auto;
    padding: 22px;
    gap: 18px;
    background-color: #e9f3eb;
    border-radius: 18px;
    border: 1px solid #c8ded5;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.06);
}

.product_grid {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    background-color: white;
    border: 1px solid #dfe6e1;
    border-radius: 18px;
    padding: 20px;
}

.product_intro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.product_page .product-image {
    flex: 0 0 300px;
    min-width: 240px;
    max-width: 360px;
    width: 100%;
    height: 240px;
    background-color: #f6faf5;
    border: 1px solid #e7ece8;
    border-radius: 18px;
    padding: 16px;
}

.product_summary {
    flex: 1 1 360px;
    min-width: 280px;
    background-color: white;
    border: 1px solid #dfe6e1;
    border-radius: 16px;
    padding: 18px;
}

.product_summary .banner_eyebrow {
    margin-bottom: 8px;
    background-color: transparent;
    border: none;
    padding: 0;
}

.product_summary .product_description {
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.product_info {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.product_info section {
    background-color: white;
    border: 1px solid #dfe6e1;
    border-radius: 16px;
    padding: 18px;
}

.product_info section p {
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.product_info section ul {
    margin: 0;
    padding: 0;
    border: none;
    background-color: transparent;
}

.product_page h2 {
    color: #02734A;
    font-size: 2rem;
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 8px;
}

.product_page p {
    font-size: 1rem;
    line-height: 1.5;
    color: #111;
    background-color: white;
    border: 1px solid black;
    border-radius: 8px;
    padding: 14px;
}

.product_page form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    background-color: white;
    border: 1px solid black;
    border-radius: 10px;
    padding: 14px;
}

.product_page form label {
    font-weight: 600;
    color: #02734A;
    min-width: 130px;
}

.product_page select {
    flex: 1;
    min-width: 180px;
    padding: 10px;
    border: 1px solid black;
    border-radius: 8px;
    background-color: white;
    font-family: Raleway, sans-serif;
}

.product_page form button {
    margin-top: 0;
}

.section_title {
    color: #02734A;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 10px;
}

.product_page button {
    align-self: flex-start;
    background-color: #02734A;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
}

.product_page button:hover {
    background-color: #015a38;
}

.product_page ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: white;
    border: 1px solid black;
    border-radius: 8px;
}

.product_page li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #c8ded5;
    font-size: 1rem;
}

.product_page li:last-child {
    border-bottom: none;
}

.product_page .product_price_list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background-color: #eef7f2;
    border: none;
    border-radius: 12px;
    padding: 8px;
}

.product_page .product_price_list .product-price {
    gap: 5px;
    padding: 6px 8px;
    background-color: white;
    border: 1px solid #c8ded5;
    border-bottom: none;
}

/* LOGIN PAGE */
.auth-element {
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    gap: 18px;
    background-color: #E6F2ED;
}

.auth-form {
    width: 100%;
    max-width: 420px;
    background-color: white;
    border: 1px solid #c8ded5;
    border-radius: 12px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.auth-form label {
    font-weight: 600;
    color: #02734A;
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
    min-height: 46px;
    border: 1px solid #c8ded5;
    border-radius: 8px;
    padding: 0 12px;
    font-family: Raleway, sans-serif;
    font-size: 1rem;
}

.auth-form input:focus {
    outline: 2px solid #02734A;
    border-color: transparent;
}

.auth-form input[type="submit"] {
    margin-top: 8px;
    min-height: 46px;
    border: none;
    border-radius: 8px;
    background-color: #02734A;
    color: white;
    font-weight: 700;
    font-family: Raleway, sans-serif;
    cursor: pointer;
}

.auth-form input[type="submit"]:hover {
    background-color: #015a38;
}

.auth-element p {
    font-size: 0.95rem;
}

.auth-element a {
    color: #02734A;
    font-weight: 700;
    text-decoration: none;
}

.auth-element a:hover {
    text-decoration: underline;
}

/* MOBILE OVERRIDES */
@media (max-width: 700px) {
    header {
        position: relative;
        width: 100%;
        height: auto;
        border: none;
    }

    nav ul {
        flex-direction: row;
        justify-content: space-around;
        min-height: auto;
        width: 100%;
    }

    nav ul li {
        margin: 8px 0;
    }

    nav ul img {
        height: 28px;
    }

    nav ul h1 {
        font-size: 0.75rem;
    }

    #logo {
        display: none;
    }

    main {
        margin-left: 0;
        width: 100%;
        padding: 12px;
    }

    .content {
        width: 100%;
    }

    footer {
        display: flex;
        flex-direction: column;
        justify-content: center;
        font-size: 0.90rem;
        width: 100%;
        margin-left: 0;
        padding-left: 0;
    }

    footer a {
        color: #111;
        text-decoration: none;
    }

    .contact {
        justify-content: center;
    }

    #search_box {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .sort_wrapper {
        justify-content: space-between;
    }

    #sort,
    #filterByCategory {
        width: 100%;
    }

    #article-box {
        width: 100%;
    }

    .banner_track,
    .banner_slide img {
        min-height: 220px;
    }

    .banner_overlay {
        left: 14px;
        right: 14px;
        bottom: 64px;
        max-width: none;
        padding: 14px 16px;
    }

    .banner_overlay h2 {
        font-size: 1.35rem;
    }

    .banner_controls {
        left: 14px;
        right: 14px;
        bottom: 14px;
        justify-content: space-between;
    }

    #article-box article {
        flex: 1 1 100%;
    }

    #login_form {
        max-width: 100%;
        padding: 24px;
    }

    .product_page {
        width: 100%;
        padding: 14px;
    }

    /* Wishlist */
    .shoppinglist {
        gap: 10px;
    }

    #create-wishlist-form {
        flex-direction: column;
        align-items: stretch;
    }

    #create-wishlist-form input,
    #create-wishlist-form button {
        width: 100%;
    }

    .wishlist-tabs ul {
        flex-direction: column;
    }

    .shoppinglist-table {
        min-width: 550px;
    }

    /* LOGIN */
    .auth-element {
        min-height: auto;
        padding: 16px;
        justify-content: flex-start;
    }

    #login_form {
        width: 100%;
        max-width: 340px;
        padding: 20px;
        gap: 10px;
        border-radius: 8px;
    }

    #login_form label {
        font-size: 0.9rem;
    }

    #login_form input[type="text"],
    #login_form input[type="password"] {
        min-height: 40px;
        font-size: 0.95rem;
        padding: 0 10px;
    }

    #login_form input[type="submit"] {
        min-height: 40px;
        font-size: 0.95rem;
    }

    .auth-element p {
        max-width: 340px;
        text-align: center;
        font-size: 0.9rem;
    }
}
