/* Estilos para o ícone do carrinho */
.cart-icon {
    position: relative;
    cursor: pointer;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    min-width: 20px;
    text-align: center;
}

/* Estilos para o dropdown do carrinho */
.cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    z-index: 1000;
    display: none;
    margin-top: 5px;
    min-height: 100px;
    color: #333;
}

.cart-dropdown-content {
    position: relative;
    max-height: 400px;
    overflow-y: auto;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.cart-dropdown-content::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}

.cart-dropdown-container {
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

/* Estilo para a barra de rolagem */
.cart-dropdown-content::-webkit-scrollbar {
    width: 8px;
}

.cart-dropdown-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.cart-dropdown-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.cart-dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Estilo para o estado de carregamento */
.cart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    min-height: 100px;
}

.cart-loading i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Estilos para os itens do carrinho */
.cart-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    color: #333; /* Cor do texto */
}

.cart-item h6 {
    color: #333; /* Cor do nome do produto */
}

.cart-item .quantity {
    color: #333; /* Cor da quantidade */
}

.cart-item p {
    color: #333; /* Cor dos preços */
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

/* Estilos para o layout principal */
.main-layout {
    min-height: calc(100vh - 120px); /* Ajuste conforme a altura do header e footer */
    padding-top: 80px; /* Altura do header */
    padding-bottom: 60px; /* Altura do footer */
    position: relative;
}

.main-content {
    padding: 20px 0;
}

/* Ajustes para a página do carrinho */
.cart-page {
    min-height: calc(100vh - 60px); /* Ajuste conforme necessário */
    padding: 20px 0;
}

/* Garantir que o footer fique no final */
footer {
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Estilos para a página do carrinho */
.cart-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.cart-page .table {
    margin-bottom: 2rem;
}

.cart-page .btn {
    margin-bottom: 1rem;
}

.cart-page .alert {
    margin-bottom: 2rem;
}

.cart-page .table-responsive {
    overflow-x: auto;
}

.cart-page .table-responsive table {
    min-width: 800px;
}

.cart-page .cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-page .cart-item .product-name {
    font-weight: 500;
    color: #333;
}

.cart-page .cart-item .product-price {
    color: #28a745;
    font-weight: bold;
}

.cart-page .cart-item .product-quantity {
    width: 80px;
}

.cart-page .cart-item .product-subtotal {
    font-weight: bold;
}

.cart-page .cart-item .remove-btn {
    color: #dc3545;
    transition: color 0.2s;
}

.cart-page .cart-item .remove-btn:hover {
    color: #c82333;
}

.cart-page .cart-total {
    font-size: 1.25rem;
    font-weight: bold;
    color: #28a745; /* Cor do total */
}

.cart-total strong {
    color: #28a745; /* Cor do valor total */
}

.cart-page .checkout-btn {
    background-color: #28a745;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.cart-page .checkout-btn:hover {
    background-color: #218838;
}

.cart-page .continue-shopping-btn {
    background-color: #fff;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.cart-page .continue-shopping-btn:hover {
    background-color: #f8f9fa;
    border-color: #ced4da;
    color: #495057;
}

.cart-page .clear-cart-btn {
    background-color: #dc3545;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.cart-page .clear-cart-btn:hover {
    background-color: #c82333;
}

.cart-page .empty-cart {
    text-align: center;
    padding: 3rem 0;
}

.cart-page .empty-cart h3 {
    color: #6c757d;
    margin-bottom: 1rem;
}

.cart-page .empty-cart a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.cart-page .empty-cart a:hover {
    color: #0056b3;
}

.cart-page .cart-item {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.cart-page .cart-item:last-child {
    border-bottom: none;
}

.cart-page .cart-item .product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-page .cart-item .product-details {
    flex: 1;
}

.cart-page .cart-item .product-name {
    margin-bottom: 0.25rem;
}

.cart-page .cart-item .product-price {
    margin-bottom: 0.5rem;
}

.cart-page .cart-item .product-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.cart-page .cart-item .quantity-input {
    width: 80px;
    text-align: center;
}

.cart-page .cart-item .remove-btn {
    padding: 0.25rem 0.5rem;
}

.cart-page .cart-summary {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
}

.cart-page .cart-summary h4 {
    margin-bottom: 1rem;
    color: #333;
}

.cart-page .cart-summary .summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: #6c757d;
}

.cart-page .cart-summary .summary-total {
    font-weight: bold;
    color: #28a745;
}

.cart-page .cart-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.cart-page .cart-actions .btn {
    flex: 1;
}

.cart-page .cart-actions .btn-secondary {
    background-color: #fff;
    border: 1px solid #dee2e6;
    color: #495057;
}

.cart-page .cart-actions .btn-secondary:hover {
    background-color: #f8f9fa;
    border-color: #ced4da;
    color: #495057;
}

.cart-page .cart-actions .btn-danger {
    background-color: #dc3545;
    border: none;
}

.cart-page .cart-actions .btn-danger:hover {
    background-color: #c82333;
}

.cart-page .cart-actions .btn-success {
    background-color: #28a745;
    border: none;
}

.cart-page .cart-actions .btn-success:hover {
    background-color: #218838;
}

.cart-page .cart-empty {
    text-align: center;
    padding: 3rem 0;
}

.cart-page .cart-empty h3 {
    color: #6c757d;
    margin-bottom: 1rem;
}

.cart-page .cart-empty a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.cart-page .cart-empty a:hover {
    color: #0056b3;
}

.cart-page .cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    z-index: 1000;
    display: none;
    margin-top: 5px;
    min-height: 100px;
}

.cart-page .cart-dropdown-content {
    position: relative;
    max-height: 400px;
    overflow-y: auto;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.cart-page .cart-dropdown-content::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}

.cart-page .cart-dropdown-container {
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.cart-page .cart-dropdown-content::-webkit-scrollbar {
    width: 8px;
}

.cart-page .cart-dropdown-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.cart-page .cart-dropdown-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.cart-page .cart-dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.cart-page .cart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    min-height: 100px;
}

.cart-page .cart-loading i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.cart-page .cart-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.cart-page .cart-item:last-child {
    border-bottom: none;
}

.cart-page .cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.cart-page .cart-icon {
    position: relative;
    cursor: pointer;
}

.cart-page .cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    min-width: 20px;
    text-align: center;
}

.cart-page .cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    z-index: 1000;
    display: none;
    margin-top: 5px;
    min-height: 100px;
}

.cart-page .cart-dropdown-content {
    position: relative;
    max-height: 400px;
    overflow-y: auto;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.cart-page .cart-dropdown-content::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}

.cart-page .cart-dropdown-container {
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.cart-page .cart-dropdown-content::-webkit-scrollbar {
    width: 8px;
}

.cart-page .cart-dropdown-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.cart-page .cart-dropdown-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.cart-page .cart-dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.cart-page .cart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    min-height: 100px;
}

.cart-page .cart-loading i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.cart-page .cart-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.cart-page .cart-item:last-child {
    border-bottom: none;
}

.cart-page .cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.cart-page .main-content {
    flex: 1;
    min-height: calc(100vh - 120px);
    position: relative;
}

.cart-page .main-content .container {
    padding-top: 20px;
    padding-bottom: 20px;
}

.cart-item h6 {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.cart-item p {
    margin-bottom: 0.1rem;
    font-size: 0.8rem;
}

/* Estilos para o total */
.cart-total {
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.cart-total p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.cart-total strong {
    font-size: 1.1rem;
}

/* Estilos para os botões */
.cart-total .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.cart-dropdown-content::after {
    content: '';
    position: absolute;
    top: -10px;
    right: 20px;
    border-width: 0 10px 10px;
    border-style: solid;
    border-color: transparent transparent white;
}

.cart-dropdown-content {
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.cart-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

.cart-loading {
    padding: 1rem;
}

.cart-loading i {
    font-size: 2rem;
    color: #6c757d;
}

.cart-loading p {
    color: #6c757d;
    margin-top: 0.5rem;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-total {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
}

/* Estilos para a página do carrinho */
.cart-quantity {
    width: 80px;
}

.cart-quantity:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Estilos para os botões do carrinho */
.remove-from-cart {
    transition: all 0.3s ease;
}

.remove-from-cart:hover {
    transform: scale(1.05);
}

.btn-danger {
    transition: all 0.3s ease;
}

.btn-danger:hover {
    transform: scale(1.05);
    background-color: #c82333;
}

.btn-outline-secondary {
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    transform: scale(1.05);
    background-color: #6c757d;
    color: white;
}

/* Estilos para o checkout */
#checkoutForm .form-check {
    margin-bottom: 1rem;
}

#paymentInfo {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
}

/* Estilos para as notificações */
.alert {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
