:root {
    --primary-color: #ff87cf;
    --primary-light: #ffb1df;
    --primary-dark: #cc6ca6;
    --accent-color: #830059;
    --text-color: #4a4a4a;
    --light-bg: #fff5f9;
    --white: #ffffff;
    --transition-speed: 0.3s;
}

body {
    background-color: var(--white);
    padding-top: 100px;
    font-family: 'Raleway', 'Montserrat', sans-serif;
    color: var(--text-color);
}

a {
    color: inherit;
    transition: all var(--transition-speed);
}

a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.header {
    background-color: var(--white);
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 135, 207, 0.2);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    padding: 10px 0;
}

.header .navbar-brand {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    color: var(--primary-color) !important;
}

.header .nav-link {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    color: var(--text-color) !important;
}

.header .nav-link:hover {
    color: var(--primary-color) !important;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -2px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.65rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.header .navbar-toggler {
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header .navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.header .navbar-toggler-icon {
    background-image: none;
    width: 25px;
    height: 2px;
    background-color: var(--primary-color);
    position: relative;
    display: block;
    transition: all 0.3s ease-in-out;
}

.header .navbar-toggler-icon::before,
.header .navbar-toggler-icon::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background-color: var(--primary-color);
    left: 0;
    transition: all 0.3s ease-in-out;
}

.header .navbar-toggler-icon::before {
    top: -8px;
}

.header .navbar-toggler-icon::after {
    bottom: -8px;
}

.header .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-color: transparent;
}

.header .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.header .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

@media (max-width: 991.98px) {
    .header .container {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        padding-left: 10px;
        padding-right: 10px;
    }

    .header .navbar-brand {
        order: 1;
        margin-right: 5px !important;
        flex-shrink: 0;
        /* max-width: 40px; removido para permitir ver o logo melhor se houver espaço */
        overflow: hidden;
    }

    .header .navbar-brand span {
        display: none !important; /* Esconde o texto do logo em mobile para dar espaço */
    }

    .header .navbar-brand img {
        height: 35px;
        width: auto;
    }

    .header #search-form {
        order: 2;
        flex-grow: 1;
        margin: 0 5px !important;
        min-width: 100px; /* Garante um tamanho mínimo para a busca */
    }

    .header .d-flex.align-items-center.ml-auto.order-lg-3 {
        order: 3;
        flex-shrink: 0;
    }

    .header .navbar-toggler {
        order: 4;
        margin-left: 5px !important;
        flex-shrink: 0;
    }

    .header .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 15px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }
}

.title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.footer {
    background-color: var(--primary-color);
    background-image: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: radial-gradient(circle at 50% 100%, transparent 20px, var(--white) 21px);
    background-size: 40px 50px;
}

.footer span {
    font-family: 'Playfair Display', serif;
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
}

.footer ul {
    padding-left: 0;
}

.footer li {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    list-style: none;
}

.footer a {
    color: rgba(255, 255, 255, 0.9);
}

.footer a:hover {
    color: var(--white);
    padding-left: 5px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all var(--transition-speed);
}

.btn-add-cart {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.quantity-input {
    border-radius: 10px;
    border: 1px solid var(--primary-light);
    text-align: center;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 135, 207, 0.4);
}

.form-header-input-text {
    border: 2px solid var(--primary-light);
    border-radius: 25px;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    transition: all var(--transition-speed);
}

@media (max-width: 991.98px) {
    .form-header-input-text {
        padding: 0.4rem 2rem 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

.form-header-input-text:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 135, 207, 0.25);
}

.header-button-query {
    background: transparent;
    cursor: pointer;
    z-index: 5;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
    border: none;
}

.header-button-query img {
    filter: none;
    height: 18px;
    width: 18px;
}

@media (max-width: 991.98px) {
    .header-button-query {
        right: 10px;
    }
    .header-button-query img {
        height: 15px;
        width: 15px;
    }
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 1rem 0;
    max-height: 80vh;
    overflow-y: auto;
}

/* Estilo para a barra de rolagem do dropdown */
.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.dropdown-item {
    font-weight: 500;
    padding: 0.7rem 1.5rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.navbar-brand img {
    filter: none !important;
    height: 50px;
    width: auto;
}

.logo-footer {
    filter: brightness(0) invert(1);
    margin-bottom: 2rem;
}

/* Glassmorphism elements */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.fade-in {
    opacity: 0;
    visibility: hidden;
    transition: none; /* Prevenir qualquer transição CSS que possa conflitar com GSAP */
}

/* Fallback para caso o JS não carregue ou demore */
.no-js .fade-in {
    opacity: 1 !important;
    visibility: visible !important;
}

.container-product {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-item:hover .container-product {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Responsividade de Tabelas (Stacked/Mobile) */
@media (max-width: 768px) {
    .table-mobile-stacked thead {
        display: none;
    }

    .table-mobile-stacked, 
    .table-mobile-stacked tbody, 
    .table-mobile-stacked tr, 
    .table-mobile-stacked td {
        display: block;
        width: 100%;
    }

    .table-mobile-stacked tr {
        margin-bottom: 1rem;
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: 8px;
        padding: 0.5rem;
        background-color: #fff;
    }

    .table-mobile-stacked td {
        text-align: right !important;
        padding-left: 50% !important;
        position: relative;
        border-top: 1px solid rgba(0,0,0,0.05);
    }

    .table-mobile-stacked td:first-child {
        border-top: none;
    }

    .table-mobile-stacked td::before {
        content: attr(data-label);
        position: absolute;
        left: 0.75rem;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: var(--text-color);
    }

    /* Ajuste para células que contém muito conteúdo (ex: Nome do Produto) */
    .table-mobile-stacked td[data-label="Produto"] {
        text-align: left !important;
        padding-left: 0.75rem !important;
        padding-top: 2rem !important;
    }

    .table-mobile-stacked td[data-label="Produto"]::before {
        top: 0.5rem;
        width: 100%;
    }

    .table-mobile-stacked td[data-label="Produto"] .d-flex {
        min-width: auto !important;
    }

    /* Ajuste para inputs de quantidade e botões de ação */
    .table-mobile-stacked td input {
        display: inline-block;
        width: auto !important;
    }

    /* Ajuste para o rodapé da tabela (Tfoot) no Histórico */
    .table-mobile-stacked tfoot,
    .table-mobile-stacked tfoot tr,
    .table-mobile-stacked tfoot th {
        display: block;
        width: 100%;
    }

    .table-mobile-stacked tfoot tr {
        border: none;
        margin-bottom: 0;
        padding: 0;
    }

    .table-mobile-stacked tfoot th {
        text-align: right !important;
        padding: 0.5rem 0.75rem !important;
        border-top: 1px solid rgba(0,0,0,0.05);
    }
}