/* Estilos para o catálogo de produtos no frontend */

.cow-catalog {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100vh; /* Altura total da viewport */
}

.cow-filters {
    margin-bottom: 20px;
    text-align: center;
    flex-shrink: 0; /* Não encolhe */
}

.cow-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.cow-filter-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #555;
}

.cow-filter-btn:hover {
    background: #e0e0e0;
}

.cow-filter-btn.active {
    background: #25D366; /* Cor do WhatsApp */
    color: white;
    border-color: #25D366;
}

/* Container com rolagem para os produtos */
.cow-products-container {
    flex: 1; /* Ocupa o espaço restante */
    overflow-y: auto; /* Rolagem vertical */
    padding-right: 5px; /* Espaço para a barra de rolagem */
}

/* Layout horizontal com 2 cards lado a lado */
.cow-products-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, 1fr); /* 2 colunas fixas */
    padding-bottom: 20px; /* Espaço no final */
}

.cow-product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: row; /* Layout horizontal */
    transition: all 0.3s ease;
    min-height: 200px;
    max-height: 350px; /* Limita a altura máxima para evitar quebras */
}

.cow-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.cow-product-image-container {
    width: 40%; /* 40% da largura para a imagem */
    min-width: 140px;
    flex-shrink: 0; /* Impede que a imagem encolha */
    height: auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f8f8;
}

.cow-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Mudança para 'contain' para mostrar a foto toda */
    object-position: center;
    display: block;
    min-height: 180px;
    padding: 5px; /* Pequeno padding para evitar que a imagem toque as bordas */
}

.cow-product-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    width: 60%; /* 60% da largura para o conteúdo */
    overflow: hidden; /* Garante que o texto não vaze */
}

.cow-product-name {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
    line-height: 1.3;
}

.cow-product-description {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Aumentado para 3 linhas, mas com overflow controlado */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cow-product-price {
    font-size: 1.2em;
    font-weight: bold;
    color: #25D366; /* Cor do WhatsApp */
    margin-bottom: 12px;
}

/* Categoria do produto */
.cow-product-category {
    font-size: 0.75em;
    color: #888;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 8px;
}

.cow-quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    width: 100%; /* Largura total igual ao botão */
    height: 44px; /* Altura fixa maior */
    background: #fff;
}

.cow-quantity-btn {
    background: #f9f9f9;
    border: none;
    cursor: pointer;
    font-size: 1.4em;
    color: #333;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1; /* Ocupa espaço igual */
    height: 100%;
    font-weight: bold;
    user-select: none;
}

.cow-quantity-btn:hover {
    background: #e8e8e8;
    color: #25D366;
}

.cow-quantity-btn:active {
    background: #ddd;
    transform: scale(0.95);
}

.cow-quantity-input {
    flex: 2; /* Ocupa mais espaço que os botões */
    text-align: center;
    border: none;
    border-left: 2px solid #eee;
    border-right: 2px solid #eee;
    height: 100%;
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    background: #fff;
    outline: none;
    -moz-appearance: textfield; /* Remove setas no Firefox */
    -webkit-appearance: none; /* Remove setas no Safari/Chrome */
    padding: 0 8px;
    min-width: 0; /* Permite que o input encolha */
}

.cow-quantity-input::-webkit-outer-spin-button,
.cow-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cow-quantity-input:focus {
    background: #f8fff8;
    border-left-color: #25D366;
    border-right-color: #25D366;
    box-shadow: inset 0 0 0 1px #25D366;
}

.cow-quantity-input::placeholder {
    color: #999;
    font-weight: normal;
}

/* Botão adicionar ao carrinho */
.cow-add-to-cart-btn {
    width: 100%;
    background: #25D366; /* Cor do WhatsApp */
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    height: 44px; /* Mesma altura do seletor de quantidade */
}

.cow-add-to-cart-btn:hover {
    background: #128C7E; /* Tom mais escuro do WhatsApp */
    transform: translateY(-1px);
}

.cow-add-to-cart-btn.success {
    background: #28a745;
}

.cow-empty-catalog {
    grid-column: 1 / -1; /* Ocupa todas as colunas */
    text-align: center;
    padding: 50px 20px;
    background: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 12px;
    color: #777;
}

.cow-empty-catalog .cow-empty-icon {
    font-size: 4em;
    margin-bottom: 20px;
    color: #ccc;
}

.cow-empty-catalog h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #555;
}

.cow-empty-catalog p {
    font-size: 1em;
    color: #777;
}

/* Carrinho Flutuante */
.cow-cart-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.cow-cart-toggle {
    background: #25D366; /* Cor do WhatsApp */
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    position: relative;
    transition: transform 0.2s ease;
}

.cow-cart-toggle:hover {
    transform: scale(1.05);
}

.cow-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    padding: 4px 8px;
    font-size: 0.8em;
    font-weight: bold;
    display: none; /* Escondido por padrão */
    min-width: 20px;
    text-align: center;
}

.cow-cart-modal {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    max-height: 80vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    transform: translateX(120%);
    transition: transform 0.3s ease-out;
    z-index: 1001;
}

.cow-cart-modal.active {
    transform: translateX(0);
}

.cow-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.cow-cart-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
}

.cow-cart-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #777;
}

.cow-cart-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px 20px;
}

.cow-cart-items {
    margin-bottom: 15px;
}

.cow-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

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

.cow-cart-item-info {
    flex-grow: 1;
}

.cow-cart-item-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.cow-cart-item-price {
    font-size: 0.85em;
    color: #777;
}

.cow-cart-item-subtotal {
    font-size: 0.9em;
    color: #25D366;
    font-weight: 600;
}

.cow-cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.cow-cart-quantity-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1em;
    color: #555;
    font-weight: bold;
    transition: all 0.2s ease;
}

.cow-cart-quantity-btn:hover {
    background: #e0e0e0;
    color: #25D366;
}

.cow-cart-item-quantity span {
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
    min-width: 24px;
    text-align: center;
    background: #f8f8f8;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.cow-cart-item-remove {
    background: none;
    border: none;
    color: #ff4757;
    cursor: pointer;
    margin-left: 10px;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.cow-cart-item-remove:hover {
    background: #ffe6e6;
}

.cow-cart-summary {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.cow-cart-total {
    font-size: 1.1em;
    margin-bottom: 15px;
}

.cow-send-whatsapp-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cow-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.cow-cart-overlay.active {
    display: block;
}

.cow-cart-empty {
    text-align: center;
    padding: 30px 0;
    color: #777;
}

.cow-cart-empty svg {
    color: #ccc;
    margin-bottom: 15px;
}

/* Notificações */
.cow-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2ed573;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateX(120%);
    transition: transform 0.3s ease-out;
}

.cow-notification.active {
    transform: translateX(0);
}

.cow-notification-error {
    background: #ff4757;
}

/* Animações */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.cow-cart-toggle.pulse {
    animation: pulse 0.6s ease-in-out;
}

@keyframes bounceIn {
    0%, 20%, 40%, 60%, 80%, 100% { -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); }
    0% { opacity: 0; -webkit-transform: scale3d(.3, .3, .3); transform: scale3d(.3, .3, .3); }
    20% { -webkit-transform: scale3d(1.1, 1.1, 1.1); transform: scale3d(1.1, 1.1, 1.1); }
    40% { -webkit-transform: scale3d(.9, .9, .9); transform: scale3d(.9, .9, .9); }
    60% { opacity: 1; -webkit-transform: scale3d(1.03, 1.03, 1.03); transform: scale3d(1.03, 1.03, 1.03); }
    80% { -webkit-transform: scale3d(.97, .97, .97); transform: scale3d(.97, .97, .97); }
    100% { opacity: 1; -webkit-transform: scale3d(1, 1, 1); transform: scale3d(1, 1, 1); }
}

.cow-cart-count.bounceIn {
    animation: bounceIn 0.7s;
}

/* Estilização da barra de rolagem */
.cow-products-container::-webkit-scrollbar {
    width: 6px;
}

.cow-products-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.cow-products-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.cow-products-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsividade */
@media (max-width: 1024px) {
    .cow-catalog {
        padding: 15px;
        height: 100vh;
    }
    
    .cow-products-grid {
        gap: 15px;
    }
    
    .cow-product-card {
        min-height: 160px;
    }
    
    .cow-product-image {
        min-height: 160px;
    }
}

@media (max-width: 768px) {
    .cow-catalog {
        padding: 10px;
        height: 100vh;
    }
    
    .cow-filters {
        margin-bottom: 15px;
    }
    
    .cow-products-container {
        flex: 1;
        overflow-y: auto;
        padding-right: 3px;
    }
    
    .cow-products-grid {
        grid-template-columns: repeat(2, 1fr); /* Mantém 2 colunas em mobile */
        gap: 12px;
        padding-bottom: 80px; /* Espaço para o carrinho flutuante */
    }
    
    .cow-product-card {
        flex-direction: column; /* Layout vertical para cards menores */
        min-height: 320px;
        max-height: 450px; /* Aumentado para acomodar conteúdo em coluna */
    }
    
    .cow-product-image-container {
        width: 100%;
        height: 130px; /* Altura menor para mobile */
    }
    
    .cow-product-image {
        min-height: 130px;
        padding: 3px;
    }
    
    .cow-product-content {
        width: 100%;
        padding: 12px;
    }
    
    .cow-product-name {
        font-size: 0.95em;
        margin-bottom: 6px;
    }
    
    .cow-product-description {
        font-size: 0.8em;
        margin-bottom: 8px;
        -webkit-line-clamp: 2; /* Aumentado para 2 linhas em mobile */
    }
    
    .cow-product-price {
        font-size: 1em;
        margin-bottom: 8px;
    }
    
    .cow-product-category {
        font-size: 0.7em;
        margin-bottom: 6px;
    }
    
    .cow-quantity-controls {
        width: 100%;
        margin-bottom: 8px;
        height: 38px;
        border-width: 1px;
    }
    
    .cow-quantity-input {
        font-size: 1em;
        padding: 0 6px;
    }
    
    .cow-quantity-btn {
        font-size: 1.2em;
    }
    
    .cow-add-to-cart-btn {
        font-size: 0.8em;
        padding: 8px 10px;
        height: 38px;
    }
    
    .cow-cart-modal {
        width: 95%;
        right: 2.5%;
        bottom: 20px;
        max-height: 70vh;
    }
    
    .cow-cart-float {
        bottom: 15px;
        right: 15px;
    }
    
    .cow-cart-toggle {
        width: 55px;
        height: 55px;
    }
}

@media (max-width: 480px) {
    .cow-catalog {
        padding: 8px;
        height: 100vh;
    }
    
    .cow-filter-buttons {
        gap: 6px;
    }
    
    .cow-filter-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .cow-products-grid {
        gap: 10px;
        padding-bottom: 70px;
    }
    
    .cow-product-card {
        max-height: 420px;
    }
    
    .cow-product-image-container {
        height: 110px;
    }
    
    .cow-product-image {
        min-height: 110px;
    }
    
    .cow-product-content {
        padding: 10px;
    }
    
    .cow-product-name {
        font-size: 0.9em;
    }
    
    .cow-product-description {
        font-size: 0.75em;
    }
    
    .cow-product-price {
        font-size: 0.95em;
    }
    
    .cow-quantity-controls {
        height: 36px;
    }
    
    .cow-quantity-input {
        font-size: 0.9em;
        padding: 0 4px;
    }
    
    .cow-quantity-btn {
        font-size: 1.1em;
    }
    
    .cow-add-to-cart-btn {
        font-size: 0.75em;
        padding: 6px 8px;
        height: 36px;
    }
    
    .cow-cart-modal {
        width: 98%;
        right: 1%;
        max-height: 65vh;
    }
}

/* Itens Opcionais */
.cow-product-optionals {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.cow-optionals-title {
    font-size: 0.85em;
    font-weight: bold;
    margin: 0 0 8px 0;
    color: #555;
}

.cow-optional-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    color: #444;
    cursor: pointer;
    margin-bottom: 5px;
    transition: color 0.2s;
}

.cow-optional-label:hover {
    color: #25D366;
}

.cow-optional-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.cow-optional-price {
    color: #888;
    font-size: 0.9em;
}

/* Prova Social no Carrinho */
.cow-social-proof-container {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #eee;
    overflow: hidden;
    position: relative;
}

.cow-social-proof-carousel {
    position: relative;
    min-height: 100px;
}

.cow-social-proof-item {
    display: none;
    animation: cowFadeIn 0.5s ease-in-out;
}

.cow-social-proof-item.active {
    display: block;
}

.cow-social-proof-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.cow-social-proof-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cow-social-proof-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cow-social-proof-info {
    flex: 1;
}

.cow-social-proof-name {
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

.cow-social-proof-rating {
    color: #ffc107;
    font-size: 12px;
}

.cow-social-proof-comment {
    font-style: italic;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.cow-social-proof-dots {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    gap: 5px;
}

.cow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s;
}

.cow-dot.active {
    background: #25D366;
}

@keyframes cowFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Melhorias visuais adicionais */
.cow-product-card {
    position: relative;
    overflow: hidden;
}

.cow-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.cow-product-card:hover::before {
    left: 100%;
}

/* Ajustes para melhor alinhamento */
.cow-quantity-controls {
    align-self: stretch;
}

.cow-add-to-cart-btn {
    margin-top: auto;
}

/* Indicador de rolagem para mobile */
@media (max-width: 768px) {
    .cow-products-container::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 20px;
        background: linear-gradient(transparent, rgba(255,255,255,0.8));
        pointer-events: none;
    }
}

/* Estilos para melhor visibilidade do input */
.cow-quantity-input:not(:placeholder-shown) {
    font-weight: bold;
    color: #25D366;
}

/* Animação para mudanças de quantidade */
.cow-quantity-input.cow-quantity-changed {
    animation: quantityPulse 0.3s ease;
}

@keyframes quantityPulse {
    0% { background-color: #fff; }
    50% { background-color: #e8f5e8; }
    100% { background-color: #fff; }
}


/* Garante que o input de quantidade seja sempre visível */
.cow-quantity-input {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 50px !important;
    width: auto !important;
    flex: 2 !important;
    text-align: center !important;
    font-size: 1.1em !important;
    font-weight: bold !important;
    color: #333 !important;
    background: #fff !important;
    border: none !important;
    border-left: 2px solid #eee !important;
    border-right: 2px solid #eee !important;
    outline: none !important;
    padding: 0 8px !important;
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
}

/* Força visibilidade em mobile */
@media (max-width: 768px) {
    .cow-quantity-input {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-width: 40px !important;
        font-size: 1em !important;
        padding: 0 6px !important;
        background-color: #ffffff !important;
        border: 1px solid #ddd !important;
        border-left: 2px solid #eee !important;
        border-right: 2px solid #eee !important;
    }
}

@media (max-width: 480px) {
    .cow-quantity-input {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-width: 35px !important;
        font-size: 0.9em !important;
        padding: 0 4px !important;
        background-color: #ffffff !important;
        border: 1px solid #ddd !important;
        border-left: 2px solid #eee !important;
        border-right: 2px solid #eee !important;
    }
}



/*



_CSS_CODE_


.cow-customer-info {
    margin-bottom: 15px;
}

.cow-customer-info input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.cow-customer-info input[type="text"]::placeholder {
    color: #aaa;
}

