/* ====================================
   CARRINHO DE COMPRAS - Estilos CSS
   Estilos específicos para o carrinho e badge
   ==================================== */

/* BADGE DE CONTAGEM DE ITENS NO CABEÇALHO */
.carrinho-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #D4AF37;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.75rem;
    margin-left: 5px;
    animation: pulse 0.3s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1.3);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* LINK DE CARRINHO NO HEADER */
nav ul li a.carrinho-link {
    font-size: 14px;
    color: #f9f9f9;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

nav ul li a.carrinho-link:hover {
    color: #D4AF37;
}



/* PÁGINA DE PRODUTOS */
.titulo-produtos {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
}

.titulo-produtos h2 {
    margin: 0;
    font-size: 2rem;
    color: #333;
}

.select-categoria {
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.select-categoria:focus {
    border-color: #D4AF37;
    outline: none;
}

.produtos-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.produto {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.produto:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.produto img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.produto:hover img {
    transform: scale(1.08);
}

.produto h3 {
    padding: 15px 15px 5px;
    font-size: 1.2rem;
    color: #333;
    margin: 0;
}

.produto p {
    padding: 0 15px;
    color: #666;
    font-size: 0.95rem;
    margin: 5px 0;
}

.produto p strong {
    color: #D4AF37;
    font-size: 1.3rem;
}

.produto form {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.produto .cta-button {
    width: 100%;
    margin-top: auto;
}

/* TABELA DE CARRINHO */
.carrinho-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carrinho-table thead {
    background: linear-gradient(135deg, #333 0%, #444 100%);
}

.carrinho-table th {
    padding: 16px 15px;
    text-align: left;
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
    border-bottom: 3px solid #D4AF37;
}

.carrinho-table td {
    padding: 16px 15px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.carrinho-table tbody tr:hover {
    background-color: #f9f9f9;
    transition: background-color 0.3s ease;
}

.carrinho-table tbody tr:last-child td {
    border-bottom: none;
}

.carrinho-table img.thumb {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    margin-right: 12px;
    vertical-align: middle;
}

.carrinho-table input[type="number"] {
    width: 70px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.carrinho-table input[type="number"]:focus {
    border-color: #D4AF37;
    outline: none;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.carrinho-table a {
    color: #d9534f;
    text-decoration: none;
    font-size: 1.4rem;
    transition: color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

.carrinho-table a:hover {
    color: #c9302c;
    transform: scale(1.2);
}

/* TOTAL DO CARRINHO */
.total {
    text-align: right;
    margin-top: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    font-size: 1.4rem;
    font-weight: bold;
    color: #333;
}

.total strong {
    color: #D4AF37;
}

/* RESPONSIVIDADE */
@media (max-width: 1024px) {
    .titulo-produtos {
        flex-direction: column;
        gap: 15px;
    }
    
    .titulo-produtos h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .produtos-container {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .produto {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    .carrinho-table {
        font-size: 0.9rem;
    }
    
    .carrinho-table th {
        padding: 12px 10px;
    }
    
    .carrinho-table td {
        padding: 12px 10px;
    }
    
    .carrinho-table img.thumb {
        width: 70px;
        height: 70px;
    }
    
    .carrinho-table input[type="number"] {
        width: 50px;
        padding: 6px;
    }
    
    .total {
        padding: 15px;
        font-size: 1.2rem;
    }
}

@media (max-width: 600px) {
    .produtos-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .titulo-produtos {
        padding: 15px;
        flex-direction: column;
        gap: 12px;
    }
    
    .titulo-produtos h2 {
        font-size: 1.4rem;
    }
    
    .produto img {
        height: 200px;
    }
    
    .produto h3 {
        font-size: 1rem;
    }
    
    .carrinho-table {
        font-size: 0.9rem;
        margin-top: 20px;
    }
    
    .carrinho-table th {
        padding: 12px 8px;
        font-size: 0.9rem;
    }
    
    .carrinho-table td {
        padding: 12px 8px;
    }
    
    .carrinho-table img.thumb {
        width: 65px;
        height: 65px;
        margin-right: 8px;
    }
    
    .carrinho-table input[type="number"] {
        width: 45px;
        font-size: 0.9rem;
    }
    
    .total {
        padding: 15px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .produtos-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .titulo-produtos {
        padding: 12px;
        gap: 10px;
    }
    
    .titulo-produtos h2 {
        font-size: 1.2rem;
    }
    
    .select-categoria {
        width: 100%;
        padding: 8px 12px;
        font-size: 0.95rem;
    }
    
    .produto {
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }
    
    .produto img {
        height: 180px;
    }
    
    .produto h3 {
        font-size: 0.95rem;
        padding: 12px 12px 5px;
    }
    
    .produto p {
        font-size: 0.9rem;
        padding: 0 12px;
    }
    
    .produto form {
        padding: 12px;
    }
    
    .carrinho-table {
        font-size: 0.8rem;
    }
    
    .carrinho-table th, .carrinho-table td {
        padding: 8px 6px;
    }
    
    .carrinho-table img.thumb {
        width: 50px;
        height: 50px;
        margin-right: 6px;
    }
    
    .carrinho-table input[type="number"] {
        width: 40px;
        padding: 5px;
        font-size: 0.85rem;
    }
    
    .total {
        padding: 12px;
        font-size: 1rem;
        text-align: center;
    }
    
    nav ul li a.carrinho-link {
        font-size: 14px;
    }
}

@media (max-width: 380px) {
    .titulo-produtos h2 {
        font-size: 1rem;
    }
    
    .select-categoria {
        font-size: 0.9rem;
        padding: 7px 10px;
    }
    
    .produtos-container {
        gap: 10px;
    }
    
    .produto h3 {
        font-size: 0.9rem;
    }
    
    .produto p {
        font-size: 0.85rem;
    }
    
    .carrinho-badge {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }
    
    .carrinho-table th {
        font-size: 0.75rem;
        padding: 6px 4px;
    }
    
    .carrinho-table td {
        padding: 6px 4px;
    }
    
    .carrinho-table img.thumb {
        width: 45px;
        height: 45px;
        margin-right: 4px;
    }
    
    .cta-button {
        padding: 10px 15px !important;
        font-size: 0.9rem;
    }
}
