/* produtos.css - Versão atualizada com cores */

/* ============================================
   PRODUTOS.CSS - Estilos da Página de Produtos
   ============================================ */

/* ---- Navegação por categorias ---- */
.categoria-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    padding: 15px 0;
    border-bottom: 2px solid #e9ecef;
}

.cat-nav-item {
    background: #f8f9fa;
    padding: 8px 20px;
    border-radius: 25px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e9ecef;
}

.cat-nav-item:hover,
.cat-nav-item:focus {
    background: #c0392b;
    color: #fff;
    transform: translateY(-2px);
    border-color: #c0392b;
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
}

.cat-nav-item .badge {
    background: #c0392b;
    color: #fff;
    border-radius: 50%;
    padding: 0px 8px;
    font-size: 11px;
    line-height: 19px;
    min-width: 20px;
    text-align: center;
}

.cat-nav-item:hover .badge {
    background: #fff;
    color: #c0392b;
}

/* ---- Categoria Section ---- */
.categoria-section {
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.categoria-section:last-child {
    border-bottom: none;
}

.categoria-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.categoria-header h2 {
    font-size: 24px;
    color: #c0392b;
    margin: 0;
    font-weight: 700;
}

.total-produtos {
    background: #f8f9fa;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

/* ---- Grid de Produtos ---- */
.produtos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* ---- Produto Card ---- */
.produto-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
}

.produto-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: #c0392b;
}

.produto-codigo {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #c0392b;
    color: #fff;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* ---- Imagem do produto ---- */
.produto-img {
    padding: 30px 20px 20px;
    text-align: center;
    font-size: 52px;
    color: #c0392b;
    background: #fdf6f5;  /* Fundo levemente rosado */
    border-bottom: 1px solid #f0e8e7;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.produto-img i {
    transition: transform 0.3s ease;
}

.produto-card:hover .produto-img i {
    transform: scale(1.15);
}

/* ---- Informações do produto ---- */
.produto-info {
    padding: 18px 20px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.produto-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #2c3e50;
    line-height: 1.3;
}

.subcategoria {
    font-size: 13px;
    color: #c0392b;
    font-weight: 500;
    margin: 0 0 8px;
}

.descricao {
    font-size: 13px;
    color: #6c757d;
    margin: 0 0 10px;
    line-height: 1.5;
    flex: 1;
}

.detalhe {
    font-size: 12px;
    color: #6c757d;
    margin: 2px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detalhe i {
    color: #c0392b;
    width: 18px;
    text-align: center;
}

/* ---- Botão ---- */
.produto-info .btn {
    margin-top: 14px;
    align-self: flex-start;
    padding: 8px 24px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid #c0392b;
    color: #c0392b;
    background: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.produto-info .btn:hover {
    background: #c0392b;
    color: #fff;
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.3);
}

/* ---- Alert ---- */
.alert {
    padding: 25px 30px;
    border-radius: 12px;
    text-align: center;
    margin: 30px 0;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.alert-warning i {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

.alert-warning p {
    margin: 5px 0;
}

/* ---- Responsivo ---- */
@media (max-width: 992px) {
    .produtos-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .categoria-nav {
        gap: 8px;
        padding: 10px 0;
        justify-content: center;
    }
    
    .cat-nav-item {
        font-size: 12px;
        padding: 6px 14px;
    }
    
    .categoria-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .categoria-header h2 {
        font-size: 20px;
    }
    
    .produtos-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .produto-img {
        font-size: 40px;
        padding: 20px 15px 15px;
        min-height: 100px;
    }
    
    .produto-info h3 {
        font-size: 14px;
    }
    
    .produto-codigo {
        font-size: 10px;
        padding: 1px 10px;
    }
}

@media (max-width: 480px) {
    .categoria-nav {
        gap: 5px;
    }
    
    .cat-nav-item {
        font-size: 11px;
        padding: 4px 12px;
        border-radius: 20px;
    }
    
    .cat-nav-item .badge {
        font-size: 10px;
        line-height: 17px;
        min-width: 17px;
        padding: 0px 6px;
    }
    
    .produtos-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .produto-img {
        font-size: 32px;
        padding: 15px 10px 12px;
        min-height: 80px;
    }
    
    .produto-info {
        padding: 12px 14px 16px;
    }
    
    .produto-info h3 {
        font-size: 12px;
    }
    
    .subcategoria {
        font-size: 11px;
    }
    
    .descricao {
        font-size: 11px;
    }
    
    .detalhe {
        font-size: 10px;
    }
    
    .produto-info .btn {
        font-size: 11px;
        padding: 5px 16px;
        margin-top: 10px;
    }
    
    .produto-codigo {
        font-size: 9px;
        padding: 1px 8px;
        top: 8px;
        right: 8px;
    }
}

@media (max-width: 380px) {
    .produtos-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- CAMPO DE BUSCA ---- */
.busca-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.busca-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.busca-input-group {
    flex: 1;
    position: relative;
    min-width: 250px;
}

.busca-input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 16px;
}

.busca-input-group input {
    width: 100%;
    padding: 12px 45px 12px 45px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 15px;
    background: #ffffff;
    transition: all 0.3s ease;
    color: #333;
}

.busca-input-group input:focus {
    outline: none;
    border-color: #c0392b;
    box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.1);
}

.busca-input-group input::placeholder {
    color: #adb5bd;
}

.btn-limpar-busca {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    text-decoration: none;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-limpar-busca:hover {
    color: #c0392b;
    background: #f1f1f1;
}

.btn-buscar {
    padding: 12px 30px;
    background: #c0392b;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-buscar:hover {
    background: #a93226;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
}

.busca-resultados {
    margin-top: 12px;
    font-size: 14px;
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: center;
}

.busca-resultados #totalResultados {
    font-weight: 700;
    color: #333;
    font-size: 16px;
}

.busca-termo {
    background: #e9ecef;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 13px;
}

.busca-termo strong {
    color: #c0392b;
}

/* ---- Filtro de categorias ativo ---- */
.cat-nav-item.active {
    background: #c0392b;
    color: #fff;
    border-color: #c0392b;
}

.cat-nav-item.active .badge {
    background: #fff;
    color: #c0392b;
}

.cat-nav-item.cat-nav-all {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}

.cat-nav-item.cat-nav-all:hover {
    background: #1a252f;
    border-color: #1a252f;
}

.cat-nav-item.cat-nav-all .badge {
    display: none;
}

/* ---- Alert de busca vazia ---- */
.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.alert-info i {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
}

.alert-info a {
    color: #c0392b;
    font-weight: 600;
    text-decoration: underline;
}

.alert-info a:hover {
    color: #a93226;
}

/* ---- Responsivo ---- */
@media (max-width: 768px) {
    .busca-container {
        padding: 18px 20px;
    }
    
    .busca-form {
        flex-direction: column;
    }
    
    .busca-input-group {
        min-width: 100%;
    }
    
    .btn-buscar {
        width: 100%;
        justify-content: center;
    }
    
    .busca-resultados {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .busca-container {
        padding: 14px 14px;
    }
    
    .busca-input-group input {
        padding: 10px 40px 10px 40px;
        font-size: 14px;
    }
    
    .busca-input-group i {
        left: 12px;
        font-size: 14px;
    }
    
    .btn-limpar-busca {
        right: 8px;
        font-size: 16px;
    }
    
    .btn-buscar {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ---- Botão Adicionar ao Carrinho ---- */
.btn-add-cart {
    margin-top: 12px;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid #c0392b;
    color: #c0392b;
    background: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

.btn-add-cart:hover {
    background: #c0392b;
    color: #fff;
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.3);
    transform: translateY(-2px);
}

.btn-add-cart i {
    font-size: 14px;
}

/* ---- Preço do produto ---- */
.produto-preco {
    font-size: 18px;
    font-weight: 700;
    color: #c0392b;
    margin: 6px 0 4px;
}

.produto-sem-preco {
    font-size: 13px;
    color: #999;
    margin: 6px 0 4px;
    font-style: italic;
}

/* ---- Modal do Carrinho (mesmo estilo da pedidos) ---- */
.cart-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #c0392b;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(192, 57, 43, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    font-size: 24px;
}

.cart-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(192, 57, 43, 0.5);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #fff;
    color: #c0392b;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-modal {
    position: fixed;
    top: 0;
    right: -450px;
    width: 420px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    z-index: 1000;
    transition: right 0.3s ease;
    box-shadow: -5px 0 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}

.cart-modal.active {
    right: 0;
}

.cart-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.cart-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.close-cart {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
    padding: 5px;
    transition: color 0.3s;
}

.close-cart:hover {
    color: #c0392b;
}

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

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.cart-empty i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.cart-empty h3 {
    color: #666;
    margin-bottom: 5px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f1f1;
}

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

.cart-item-img {
    width: 50px;
    height: 50px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-img i {
    font-size: 22px;
    color: #c0392b;
}

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

.cart-item-info h5 {
    margin: 0 0 2px;
    font-size: 14px;
    color: #333;
}

.cart-item-price {
    font-size: 13px;
    color: #666;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #c0392b;
    color: #fff;
    border-color: #c0392b;
}

.qty-display {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

.remove-item {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.3s;
}

.remove-item:hover {
    color: #c0392b;
}

.cart-footer {
    padding: 18px 25px 25px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
}

.cart-total strong {
    font-size: 20px;
    color: #c0392b;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-whatsapp-cart {
    padding: 12px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-whatsapp-cart:hover {
    background: #1da85c;
    transform: translateY(-2px);
}

.btn-clear-cart {
    padding: 10px;
    background: #f1f1f1;
    color: #666;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-clear-cart:hover {
    background: #e9ecef;
    color: #c0392b;
}

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

.overlay.active {
    display: block;
}

/* ---- Responsivo ---- */
@media (max-width: 768px) {
    .cart-modal {
        width: 100%;
        max-width: 100%;
        right: -100%;
    }
    
    .cart-float {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
    
    .btn-add-cart {
        font-size: 12px;
        padding: 6px 16px;
    }
}

@media (max-width: 480px) {
    .cart-item-controls .qty-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .cart-item-img {
        width: 40px;
        height: 40px;
    }
    
    .cart-item-img i {
        font-size: 18px;
    }
}