/* ==========================================================================
   1. GRID E CARDS DE PRODUTOS
   ========================================================================== */
.cwa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.cwa-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cwa-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* Redução do tamanho da fonte do Título do Produto */
.cwa-card h3 {
    font-size: 0.95rem; /* Ajuste aqui o tamanho do título */
    font-weight: 600;
    margin: 10px 0 6px 0;
    line-height: 1.3;
}

/* Redução do tamanho da fonte da Descrição */
.cwa-descricao,
.cwa-descricao p {
    font-size: 0.8rem; /* Ajuste aqui o tamanho da descrição */
    color: #666;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

/* Proporção perfeitamente quadrada (1:1) */
.cwa-foto-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f8f9fa;
}

.cwa-foto {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

/* ==========================================================================
   2. CONTROLES DAS FOTOS NO CARD (Navegação Colada nas Bordas)
   ========================================================================== */
.cwa-card-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    border: none;
    width: 34px;
    height: 48px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s ease;
}

.cwa-card-nav:hover {
    background: rgba(0, 0, 0, 0.75);
}

.cwa-card-prev {
    left: 0;
    border-radius: 0 6px 6px 0;
}

.cwa-card-next {
    right: 0;
    border-radius: 6px 0 0 6px;
}

.cwa-card-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 10;
}

.cwa-dot {
    width: 7px;
    height: 7px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transition: background 0.2s, transform 0.2s;
}

.cwa-dot.active {
    background: #ffffff;
    transform: scale(1.3);
}

.cwa-btn-olho {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 10;
    font-size: 14px;
}

/* Preço e Botão Principal */
.cwa-preco {
    font-size: 1.1em;
    font-weight: bold;
    color: #27ae60;
    margin: 8px 0;
}

.cwa-btn-add, 
.cwa-btn-sucesso {
    background: #25D366;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    transition: background 0.2s;
}

.cwa-btn-add:hover, 
.cwa-btn-sucesso:hover {
    background: #1eb954;
}

/* ==========================================================================
   3. LIGHTBOX MODAL
   ========================================================================== */
.cwa-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background-color: rgba(0, 0, 0, 0.88);
    text-align: center;
}

.cwa-modal-body {
    display: inline-block;
    max-width: 80%;
    max-height: 80vh;
    margin-top: 3vh;
}

.cwa-modal-conteudo {
    max-width: 100%;
    max-height: 65vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.cwa-modal-thumbs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.cwa-modal-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    transition: opacity 0.2s, border-color 0.2s;
}

.cwa-modal-thumb.active, 
.cwa-modal-thumb:hover {
    opacity: 1;
    border-color: #25D366;
}

.cwa-fechar-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100000;
}

.cwa-modal-prev, 
.cwa-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 28px;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.cwa-modal-prev { left: 20px; }
.cwa-modal-next { right: 20px; }

.cwa-modal-prev:hover, 
.cwa-modal-next:hover { 
    background: rgba(255, 255, 255, 0.5); 
}

#cwa-modal-contador {
    color: #fff;
    margin-top: 8px;
    font-size: 14px;
}

/* ==========================================================================
   4. ÍCONE DO CARRINHO FLUTUANTE
   ========================================================================== */
#cwa-carrinho-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #075e54;
    color: white;
    padding: 14px 22px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 18px;
    z-index: 999;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

#cwa-carrinho-float:hover {
    background: #054840;
    color: white;
}

/* ==========================================================================
   5. PÁGINA DEDICADA DO CARRINHO
   ========================================================================== */
.cwa-pagina-carrinho {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.cwa-tabela-carrinho {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.cwa-tabela-carrinho th, 
.cwa-tabela-carrinho td {
    border-bottom: 1px solid #e0e0e0;
    padding: 12px;
    text-align: left;
    vertical-align: middle;
}

.cwa-thumb-carrinho {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.cwa-btn-remover {
    background: #ff4d4d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.cwa-btn-remover:hover {
    background: #cc0000;
}

.cwa-carrinho-resumo {
    text-align: right;
    margin-top: 20px;
}

.cwa-carrinho-botoes {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.cwa-btn-continuar {
    background: #6c757d;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: background 0.2s;
}

.cwa-btn-continuar:hover {
    background: #5a6268;
    color: #fff;
}