:root {
    --primary-color: #13443e;
    --secondary-color: #f7f7f7;
    --bg-faq-color: #fbfbfb;
}

body {
    font-family: "Outfit", sans-serif;
}

header {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 1.5rem 0;

    div.menu {
        display: flex;
        justify-content: space-between;
        align-items: center;

        .navbar-toggler {
            position: absolute;
            right: 10px;

            .navbar-toggler-icon {
                font-size: 30px;
            }
        }

        .navbar-nav {
            flex-direction: row;

            input[type="checkbox"] {
                position: absolute;
                left: -9999em;
            }
        }

        ul {
            list-style-type: none;
            display: flex;
            justify-content: end;
            width: 100%;

            li {
                padding: 0 0.5rem;
                position: relative;

                a {
                    color: var(--secondary-color);
                    display: block;
                    padding: 0.5rem 10px;
                    text-decoration: none;

                    &:hover {
                        text-decoration: underline;
                    }
                }

                a.button,
                label {
                    background-color: transparent;
                    border: 1px solid var(--secondary-color);
                    border-radius: 100px;
                    cursor: pointer;
                    padding-left: 20px;
                    padding-right: 20px;
                }
            }
        }
    }
}

.input-login {
    border-radius: 50px !important;
    width: 25% !important;
}

label {
    display: block;
    text-align: left;
}

.product-card {
    width: 100%;
    padding: 0 5px !important;
}

.product-title {
    height: 40px;
}

.product-image {
    padding: 10px;
    height: 180px;
    width: 100%;
}

.product-image img {
    max-height: 100%;
}

/* Estilos para visualização em tabela */
.table-view {
    display: flex;
    flex-direction: column;
}

.table-view .col-4 {
    width: 100%;
}

.table-view .product-card {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    background: #fff;
    gap: 10px;
}

.table-view .product-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    padding: 10px;
}

.table-view .product-title,
.table-view .product-price {
    text-align: left;
}

.table-view .product-title {
    width: 70%;
}

.table-view .product-price {
    width: 30%;
}

.table-view .product-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Ajuste para o checkbox */
.table-view .product-card input[type="checkbox"] {
    margin-right: 10px;
}

.product-card.check-opt {
    border: 1px solid #cccccc;
}

.check-opt:has(input[type="checkbox"]:checked) {
    border: 1px solid #13443e;
}

.check-opt {
    position: relative;
    padding: 0 auto !important;

    input[type="checkbox"] {
        position: absolute;
        left: -9999em;
    }

    label {
        display: block;
        padding: 1px 10px 6px;
        width: 100%;
        text-align: left;
    }
}

input[type="checkbox"]+label+ul {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--primary-color);
    border: 1px solid var(--secondary-color);
    border-radius: 5px;
    overflow: hidden;
    right: 0;
    z-index: 1;
}

@media (min-width: 767.98px) {
    input[type="checkbox"]+label+ul {
        width: 260px;
        position: absolute;
    }
}

input[type="checkbox"]:checked+label+ul {
    display: block;

    li {
        border-bottom: 1px solid var(--secondary-color);
        cursor: pointer;

        &:last-child {
            border-bottom: none;
        }

        &:hover {
            background: #1d6a60;
        }
    }
}

.floating-create {
    background: #1d6a60;
    border: 0;
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 32px;
}


footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 5em 0 2.5rem;
    font-size: 0.8rem;

    h6 {
        text-transform: uppercase;
        padding-bottom: 1rem;
    }

    a.social_link {
        font-size: 40px;
        color: #FFF;
    }

    ul {
        list-style-type: none;
        padding: 0;

        li {
            padding: 6px 0;

            a {
                color: var(--secondary-color);
                text-decoration: none;

                &:hover {
                    text-decoration: underline;
                }
            }
        }
    }

    p {
        padding: 1.5rem 0 0.5rem;
    }
}

section#faq {
    background-color: var(--bg-faq-color);
    color: var(--primary-color);
    padding: 4rem 0;

    h1 {
        text-align: center;
        margin-bottom: 2rem;
        font-size: 1.8rem;
    }

    .accordion {
        max-width: 780px;
        padding: 0 5%;
        box-sizing: border-box;
        margin: 2rem auto;
        --bs-accordion-bg: transparent !important;
        --bs-accordion-border-color: none;
        --bs-accordion-border-width: none;
        --bs-accordion-border-radius: 0;

        .accordion-item {
            border-bottom: 1px solid #d1d1d1;

            &:first-child {
                border-top: 1px solid #d1d1d1;
            }

            .accordion-button {
                box-shadow: none;
                color: var(--primary-color);
                font-weight: 400;
            }

            .accordion-button:not(.collapsed) {
                color: inherit;
                background-color: inherit;
            }
        }
    }

    a.btn {
        background-color: var(--primary-color);
        color: var(--secondary-color);
        border: none;
        padding: 1rem 3rem;
        border-radius: 100px;

        &:hover {
            background-color: #0d2f2a;
        }
    }
}

section#banner {
    padding: 1rem 0;
}

section#login_home,
section#login_page,
section#register_page,
section#checkout_page,
section#page {
    background-color: #fbfbfb;
    padding: 4rem 0;
    text-align: center;

    h3 {
        color: var(--primary-color);
        margin-bottom: 2rem;
    }

    input,
    select,
    textarea {
        width: 100%;
        padding: 1rem 2rem;
        margin: 0.5rem 0;
        margin-right: 1rem;
        border: 1px solid #d1d1d1;
        border-radius: 5px;
    }

    textarea {
        border-radius: 12px;
    }

    button {
        background-color: var(--primary-color);
        color: #FFFFFF;
        border: none;
        padding: 1rem 2rem;
        border-radius: 50px;
        cursor: pointer;

        &:hover {
            background-color: #0d2f2a;
        }
    }

    p {
        margin-top: 1rem;

        a {
            color: var(--primary-color);
        }
    }
}

section#login_page {
    background-color: #FFFFFF;

    div.container {
        background-color: #fbfbfb;
        padding: 4em 0;
        max-width: 800px;
    }
}

section#register_page,
section#page {
    background-color: #FFFFFF;

    div.container {
        background-color: #fbfbfb;
        padding: 4em 0;
        max-width: 800px;

        form {
            margin: 0 auto;
            max-width: 70%;
        }
    }
}

section#large_page{
    background-color: #FFFFFF;
    padding: 3em 0;

    div.container {
        background-color: #fbfbfb;
        box-sizing: border-box;
        padding: 4em 10px;
        max-width: 1024px;
    }

        form {
            max-width: 90%;
        }
}

form.register {
    fieldset {
        text-align: left;
        border: none;
        padding: 0;

        label {
            display: block;
            margin-top: 0.5rem;
            color: #898989;
        }

        input,
        select,
        textarea {
            width: 100% !important;
        }
    }

    fieldset.checkbox {
        display: flex;
        align-items: start;
        margin: 1rem 0;

        input {
            width: initial !important;
            margin-right: 0.5rem;
            padding-top: 0;
            margin-top: 0.3rem;
        }

        label {
            margin: 0;
        }
    }

    div.half {
        display: flex;

        fieldset:first-child {
            padding-right: 0.5rem;
        }

        fieldset:last-child {
            padding-left: 0.5rem;
        }
    }
}

section#home_features {
    background-color: #FFFFFF;
    padding: 4rem 0;

    >div {
        text-align: center;
        box-sizing: border-box;
        padding: 0 20px;

        h2 {
            color: var(--primary-color);
            text-align: center;
            margin: 2rem 0;
            font-size: 1.3rem;
            font-weight: bold;
        }

        p {
            color: #898989;
            text-align: center;
            margin-bottom: 2rem;
            font-size: 1.1rem;
        }
    }

}

section#como_funciona {
    background-color: #FFFFFF;

    h3 {
        color: var(--primary-color);
        padding-bottom: 2rem;
    }

    ol {
        list-style: none;
        counter-reset: item;
        padding: 0;
        max-width: 80%;

        li {
            position: relative;
            padding-left: 5rem;
            margin-bottom: 2rem;
            color: #898989;

            &::before {
                content: counter(item);
                counter-increment: item;
                position: absolute;
                left: 0;
                top: 0;
                width: 4rem;
                height: 4rem;
                border-radius: 50%;
                background-color: #128f7d;
                color: var(--secondary-color);
                font-size: 1.4rem;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            b {
                color: var(--primary-color);
            }
        }
    }

    a.btn {
        background-color: var(--primary-color);
        color: var(--secondary-color);
        border: none;
        padding: 1rem 3rem;
        border-radius: 100px;
        margin: 2rem 0;

        &:hover {
            background-color: #0d2f2a;
        }
    }
}

@media (max-width: 767.98px) {
    #navbarNav {
        width: 100%;
        background: var(--primary-color);
        position: absolute;
        top: 90px;
        right: 0;
    }

    #navbarNav .navbar-nav {
        flex-direction: column;
        width: 100%;
    }

    #navbarNav .nav-item {
        width: 100%;
        text-align: center;
    }
}

/* Overlay cobrindo toda a tela */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    /* Fundo escuro semi-transparente */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Loader com dois círculos girando */
.spinner {
    position: relative;
    height: 20vw;
    max-height: 160px;
    width: 20vw;
    max-width: 160px;
}

/* Círculos animados */
.circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 5px solid transparent;
    animation: spin 1.5s linear infinite;
}

.circle.one {
    border-top-color: #0d2f2a;
    border-left-color: #0d2f2a;
    width: 80%;
    height: 80%;
    margin: 10%;
}

.circle.two {
    border-right-color: #0d2f2a;
    border-bottom-color: #0d2f2a;
    animation-direction: reverse;
}


.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;

    .image-box {
        width: 180px;
        height: 180px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        background: #f8f8f8;
        border-radius: 8px;
        padding: 10px;
        box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
        position: relative;

        img {
            max-width: 100%;
            max-height: 140px;
            object-fit: contain;
            border-radius: 5px;
        }

        .delete-btn {
            color: #d9534f;
            text-decoration: none;
            font-size: 16px;
            position: absolute;
            bottom: 8px;
            right: 8px;
        }
    }
}

/* Animação de rotação */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#alert-container {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 10px;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 99999;
}

.quantity-wrapper {
    display: flex;
    width: 100%;
    position: relative;

    input {
        width: 100%;
        height: 40px;
        text-align: center;
        border: 1px solid #ccc;
        border-radius: 50px;
        font-size: 16px;
        appearance: textfield;

        &::-webkit-inner-spin-button,
        &::-webkit-outer-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
    }

    button {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 30px;
        height: 100%;
        border: none;
        background: transparent;
        font-size: 18px;
        color: #13443e;
        cursor: pointer;

        &:hover {
            color: #0f3a35;
        }

        &:first-of-type {
            left: 0;
        }

        &:last-of-type {
            right: 0;
        }
    }
}