/* Container Principal Flex: Catálogo à esquerda + Carrinho à direita */
.product-pos-wrapper {
    display: flex;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
}

.product-catalog-section {
    flex: 1;
    min-width: 0;
}

/* Barra de Pesquisa */
.product-grid-search {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.product-grid-search i {
    color: var(--main-color, #2563eb);
    margin-right: 12px;
    font-size: 16px;
}

.product-grid-search input {
    border: none;
    outline: none;
    font-size: 14px;
    width: 100%;
    background: transparent;
    color: #0f172a;
    font-weight: 500;
}

.product-grid-search input::placeholder {
    color: #94a3b8;
}

/* Filtros de Categoria (Pills) */
.product-grid-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.product-filter-btn {
    padding: 7px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
    text-transform: uppercase;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.product-filter-btn:hover {
    background: #f8fafc;
    border-color: var(--main-color, #2563eb);
    color: var(--main-color, #2563eb);
}

.product-filter-btn.active {
    background: var(--main-color, #2563eb);
    color: #fff;
    border-color: var(--main-color, #2563eb);
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
}

/* Grid + Navegação Vertical (Setas) */
.product-grid-with-nav {
    display: flex;
    gap: 16px;
    align-items: center;
}

.product-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    flex: 1;
}

@media (max-width: 1200px) {
    .product-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .product-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Setas Flutuantes de Navegação (Up/Down) */
.product-grid-nav-btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
}

.product-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--main-color, #2563eb);
    color: #fff;
    border: none;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    transition: all 0.2s ease;
}

.product-nav-btn:hover {
    filter: brightness(0.9);
    transform: scale(1.1);
}

/* ===================================================
   CARD INDIVIDUAL COM ALTO CONTRASTE E DESTAQUE VISUAL
   =================================================== */
.product-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    user-select: none;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.product-card:hover {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.15);
    transform: translateY(-4px);
    border-color: var(--main-color, #2563eb);
}

.product-card:active {
    transform: scale(0.98);
}

/* Botão de Adicionar (+) em destaque verde vibrante */
.product-card-add-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    border: 2px solid #fff;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 3px 8px rgba(22, 163, 74, 0.4);
    pointer-events: none;
    transition: transform 0.2s;
}

.product-card:hover .product-card-add-btn {
    transform: scale(1.15);
}

/* Badge de Desconto em Destaque Azul Escuro/Laranja */
.product-card-discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #0284c7;
    color: #fff;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}

/* Área de Imagem em Fundo Contrastante */
.product-card-img {
    width: 100%;
    height: 145px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    overflow: hidden;
    padding: 10px;
}

.product-card-img img {
    max-height: 125px;
    max-width: 90%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card-img img {
    transform: scale(1.08);
}

.product-card-img .no-img-icon {
    font-size: 48px;
    color: #cbd5e1;
}

/* Informações do Produto */
.product-card-info {
    padding: 12px 14px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card-name {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a; /* Escuro nítido com alto contraste */
    text-transform: uppercase;
    margin: 0 0 4px 0;
    line-height: 1.35;
    letter-spacing: -0.2px;
}

.product-card-category {
    font-size: 10px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

/* Barra de Preço com Alto Contraste (Badge Azul com Texto Nítido) */
.product-card-price-bar {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 10px 14px;
    text-align: center;
    font-size: 15px;
    font-weight: 800;
    margin: 8px 12px 12px;
    border-radius: 8px;
    border: 1.5px solid #bfdbfe;
    box-shadow: 0 1px 3px rgba(29, 78, 216, 0.08);
    transition: all 0.2s ease;
}

.product-card:hover .product-card-price-bar {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
}

/* ===================================================
   PAINEL DO CARRINHO (TAMANHO FIXO E ROLAGEM DE ITENS)
   =================================================== */
.product-cart-section {
    width: 360px;
    background: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.product-cart-header {
    background: var(--main-color, #1e293b);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-cart-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-cart-title i {
    font-size: 18px;
    background: rgba(255,255,255,0.2);
    padding: 8px;
    border-radius: 50%;
}

.product-cart-title-text {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
}

.product-cart-count-badge {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.9;
    display: block;
}

.product-cart-clear-btn {
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-cart-clear-btn:hover {
    background: rgba(0, 0, 0, 0.4);
}

/* Corpo do Carrinho com TAMANHO FIXO (380px) e Rolagem nos Itens */
.product-cart-body {
    height: 380px;
    max-height: 380px;
    overflow-y: auto;
    padding: 12px;
    background: #f8fafc;
}

/* Scrollbar Bonita no Carrinho */
.product-cart-body::-webkit-scrollbar {
    width: 6px;
}
.product-cart-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.product-cart-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.product-cart-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.cart-empty-msg {
    text-align: center;
    color: #94a3b8;
    padding: 60px 10px;
    font-size: 13px;
    font-weight: 600;
}

.cart-empty-msg i {
    font-size: 38px;
    margin-bottom: 10px;
    display: block;
    color: #cbd5e1;
}

/* Item do Carrinho com Miniatura de Imagem e Borda Definida */
.cart-item-card {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.cart-item-main-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

/* Miniatura da Imagem no Carrinho */
.cart-item-thumb {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cart-item-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-item-thumb i {
    font-size: 22px;
    color: #cbd5e1;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.cart-item-name {
    font-size: 12px;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.cart-item-cat {
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
}

.cart-item-price-info {
    text-align: right;
}

.cart-item-total-price {
    font-size: 13px;
    font-weight: 800;
    color: #1d4ed8;
}

.cart-item-unit-price {
    font-size: 10px;
    color: #94a3b8;
}

/* Controls (Stepper + Remover) */
.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.cart-stepper {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 2px;
}

.cart-stepper-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: #fff;
    color: #0f172a;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    transition: background 0.15s;
}

.cart-stepper-btn:hover {
    background: #e2e8f0;
}

.cart-stepper-val {
    padding: 0 10px;
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
}

.cart-remove-btn {
    background: transparent;
    border: none;
    color: #dc2626;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
}

.cart-remove-btn:hover {
    color: #991b1b;
}

/* Desconto por Item */
.cart-item-discount-row {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dotted #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #1d4ed8;
    font-weight: 700;
}

.cart-item-discount-input {
    width: 65px;
    padding: 3px 6px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    text-align: center;
    color: #1d4ed8;
    background: #eff6ff;
}

/* Rodapé do Carrinho (Subtotal + Desconto Geral + Total) */
.product-cart-footer {
    background: #fff;
    border-top: 2px solid #cbd5e1;
    padding: 16px;
}

.cart-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #475569;
    font-weight: 600;
    margin-bottom: 8px;
}

.cart-general-discount-input {
    width: 85px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    text-align: right;
    color: #1d4ed8;
    background: #fff;
}

.cart-summary-line.total-line {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0;
    padding-top: 10px;
    border-top: 2px solid #e2e8f0;
}

.cart-summary-line.total-line .total-val {
    color: #16a34a; /* Verde total em alto destaque */
    font-size: 20px;
}

.cart-save-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #16a34a;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
    transition: all 0.2s ease;
}

.cart-save-btn:hover {
    background: #15803d;
    transform: translateY(-1px);
}

/* Barra de Paginação dos Produtos (Máximo 6 por página) */
.product-grid-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 6px 4px;
    margin-top: 14px;
    border-top: 2px solid #e2e8f0;
}

.product-page-btn {
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.product-page-btn:hover:not(:disabled) {
    background: #1d4ed8;
    color: #fff;
    border-color: #1d4ed8;
}

.product-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.product-page-info {
    font-size: 13px;
    font-weight: 800;
    color: #475569;
}

/* Responsivo */
@media (max-width: 900px) {
    .product-pos-wrapper {
        flex-direction: column;
    }
    .product-cart-section {
        width: 100%;
    }
}
