/* 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;
    min-height: 100vh;
}

.cow-filters {
    margin-bottom: 20px;
    text-align: center;
    flex-shrink: 0;
}

.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;
    color: white;
    border-color: #25D366;
}

/* Container com rolagem para os produtos */
.cow-products-container {
    flex: 1;
    padding-right: 5px;
}

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

.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;
    transition: all 0.3s ease;
    min-height: 220px; /* Aumentado para acomodar novos elementos */
}

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

.cow-product-image-container {
    width: 40%;
    min-width: 150px;
    height: auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f8f8;
    flex-shrink: 0;
}

.cow-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    min-height: 180px;
    padding: 5px;
}

.cow-product-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 60%;
}

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

.cow-product-category {
    font-size: 0.7em;
    color: #888;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 8px;
    align-self: flex-start;
}

.cow-product-description {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cow-product-price {
    font-size: 1.2em;
    font-weight: bold;
    color: #25D366;
    margin-bottom: 10px;
}

/* Itens Opcionais */
.cow-product-optionals {
    margin-bottom: 12px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
    font-size: 0.9em;
}

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

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

.cow-optional-label:last-child {
    margin-bottom: 0;
}

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

.cow-optional-checkbox {
    width: 14px;
    height: 14px;
    cursor: pointer;
    margin: 0;
}

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

.cow-quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    height: 38px;
    background: #fff;
    margin-top: auto; /* Empurra para o final do conteúdo */
}

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

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

.cow-quantity-input {
    flex: 1.5;
    text-align: center;
    border: none;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    height: 100%;
    font-size: 1em;
    font-weight: bold;
    color: #333;
    background: #fff;
    outline: none;
    padding: 0 5px;
    width: 40px;
}

.cow-add-to-cart-btn {
    width: 100%;
    background: #25D366;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    height: 38px;
}

.cow-add-to-cart-btn:hover {
    background: #128C7E;
    transform: translateY(-1px);
}

/* Responsividade */
@media (max-width: 992px) {
    .cow-products-grid {
        grid-template-columns: 1fr;
    }
    
    .cow-product-card {
        max-width: 600px;
        margin: 0 auto;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .cow-catalog {
        padding: 10px;
    }
    
    .cow-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .cow-product-card {
        flex-direction: column;
        min-height: auto;
        max-height: none;
    }
    
    .cow-product-image-container {
        width: 100%;
        height: 150px;
        min-width: unset;
    }
    
    .cow-product-image {
        min-height: unset;
        height: 150px;
    }
    
    .cow-product-content {
        width: 100%;
        padding: 12px;
    }
    
    .cow-product-name {
        font-size: 1em;
    }
    
    .cow-product-description {
        -webkit-line-clamp: 2;
        font-size: 0.8em;
    }
    
    .cow-product-optionals {
        padding: 6px;
    }
    
    .cow-optional-label {
        font-size: 0.75em;
    }
}

@media (max-width: 480px) {
    .cow-products-grid {
        grid-template-columns: 1fr;
    }
    
    .cow-product-card {
        flex-direction: row;
        min-height: 160px;
    }
    
    .cow-product-image-container {
        width: 35%;
        height: auto;
        min-width: 110px;
    }
    
    .cow-product-image {
        height: 140px;
    }
    
    .cow-product-content {
        width: 65%;
        padding: 10px;
    }
    
    .cow-product-description {
        display: none; /* Esconde descrição em telas muito pequenas para economizar espaço */
    }
}

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

.cow-cart-toggle {
    background: #25D366;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    position: relative;
}

.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;
    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-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px 20px;
}

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

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

.cow-customer-info input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.cow-send-whatsapp-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    width: 100%;
    font-weight: bold;
    cursor: pointer;
    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;
}

/* Social Proof */
.cow-social-proof-container {
    margin-top: 15px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

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

.cow-social-proof-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

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

.cow-social-proof-name {
    font-weight: bold;
    font-size: 0.9em;
}

.cow-social-proof-rating {
    color: #ffc107;
    font-size: 0.8em;
}

.cow-social-proof-comment {
    font-size: 0.85em;
    font-style: italic;
    color: #666;
}

.cow-product-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Estilos do Painel do Cliente */
.cow-auth-container { max-width: 400px; margin: 40px auto; padding: 20px; border: 1px solid #ddd; border-radius: 8px; background: #f9f9f9; }
.cow-auth-tabs { display: flex; margin-bottom: 20px; border-bottom: 1px solid #ddd; }
.cow-tab-btn { flex: 1; padding: 10px; border: none; background: none; cursor: pointer; font-weight: bold; }
.cow-tab-btn.active { border-bottom: 2px solid #25D366; color: #25D366; }
.cow-form-group { margin-bottom: 15px; }
.cow-form-group label { display: block; margin-bottom: 5px; font-weight: bold; }
.cow-form-group input, .cow-form-group textarea { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; }
.cow-btn { background: #25D366; color: white; padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; }
.cow-btn:hover { background: #128C7E; }
.cow-dashboard { padding: 20px; }
.cow-dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.cow-dashboard-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
.cow-card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.cow-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.cow-table th, .cow-table td { padding: 12px; text-align: left; border-bottom: 1px solid #eee; }
.cow-btn-delete { background: #ff4444; color: white; border: none; padding: 5px 10px; border-radius: 3px; cursor: pointer; }
.cow-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.cow-modal-content { background: white; padding: 30px; border-radius: 8px; width: 100%; max-width: 500px; }
.cow-btn-logout { color: #666; text-decoration: none; }
