/* ============================================================================
   DESIGN MODERNO E ELEGANTE DO CARRINHO DE COMPRAS - V2.0
   Remodelado para melhor organização e experiência do usuário
   ============================================================================ */

:root {
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-color: #10b981;
    --success-light: #34d399;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --pix-color: #00b8a9;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 12px 28px rgba(99, 102, 241, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --border-radius-lg: 20px;
}

/* ============================================================================
   CONTAINER PRINCIPAL DO CARRINHO
   ============================================================================ */

.cart-page-container {
    background: linear-gradient(180deg, var(--gray-50) 0%, #f0f4ff 50%, var(--gray-50) 100%);
    min-height: calc(100vh - 80px);
    padding: 2rem 0 4rem;
}

.cart-main-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================================================
   HEADER DO CARRINHO
   ============================================================================ */

.cart-page-header {
    margin-bottom: 2.5rem;
    animation: fadeInDown 0.5s ease-out;
}

.cart-page-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.cart-page-header h2 i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.2rem;
}

.cart-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.cart-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

.cart-breadcrumb a:hover {
    color: var(--primary-dark);
}

/* ============================================================================
   CARD DE PRODUTO - DESIGN MODERNO
   ============================================================================ */

.cart-product-card {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
    position: relative;
}

.cart-product-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
    transform: translateY(-4px);
}

.cart-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.cart-product-card:hover::before {
    transform: scaleX(1);
}

/* Grid Principal do Produto */
.cart-product-grid {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 0;
}

@media (min-width: 1401px) {
    .cart-product-grid {
        grid-template-columns: 140px 1fr 150px 160px 160px;
        align-items: center;
    }
}

/* Breakpoint intermediário para monitores menores e tablets em paisagem */
@media (min-width: 768px) and (max-width: 1400px) {
    .cart-product-grid {
        grid-template-columns: 130px 1fr 160px 180px; /* Ajustado para evitar cortes */
        grid-template-rows: auto auto;
        align-items: stretch;
    }
    
    .cart-product-image-wrapper {
        grid-row: 1 / 3;
        grid-column: 1 / 2;
        min-height: auto;
        padding: 1.5rem 1rem;
    }
    
    .cart-product-info {
        grid-row: 1 / 2;
        grid-column: 2 / 3;
        padding: 1.25rem 1rem;
        border-bottom: 1px solid var(--gray-100);
    }
    
    /* Empilhando Preço e Quantidade na mesma coluna vertical */
    .cart-product-price {
        grid-row: 1 / 2;
        grid-column: 3 / 4;
        padding: 1rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: var(--gray-50);
        border-bottom: 1px solid var(--gray-100);
    }
    
    .cart-product-quantity {
        grid-row: 2 / 3;
        grid-column: 3 / 4;
        padding: 1rem;
        border-left: 1px solid var(--gray-100);
        background: white;
    }
    
    /* Subtotal e Ações ocupando a última coluna com mais espaço */
    .cart-product-actions {
        grid-row: 1 / 3;
        grid-column: 4 / 5;
        padding: 1.25rem;
        border-left: 1px solid var(--gray-100);
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 1rem;
    }
    
    .cart-product-name {
        font-size: 1rem;
        -webkit-line-clamp: 2;
    }
    
    .cart-product-tag {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }
    
    .cart-price-value {
        font-size: 1.15rem;
    }
    
    .cart-subtotal-value {
        font-size: 1.3rem;
        white-space: nowrap;
    }
    
    .cart-qty-control input {
        width: 45px;
        padding: 0.4rem;
    }
    
    .cart-qty-btn {
        width: 32px;
        height: 32px;
    }
}

/* Imagem do Produto */
.cart-product-image-wrapper {
    position: relative;
    padding: 1.5rem 1rem 1rem; /* Aumentado padding superior para baixar a imagem */
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
}

.cart-product-image {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    border: 3px solid white;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.cart-product-card:hover .cart-product-image {
    transform: scale(1.08);
    box-shadow: var(--shadow-lg);
}

/* Badge de Quantidade na Imagem */
.cart-product-qty-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--primary-gradient);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

/* Informações do Produto */
.cart-product-info {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--gray-100);
}

.cart-product-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-product-description {
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.cart-product-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cart-product-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
}

.cart-product-tag i {
    font-size: 0.7rem;
}

.cart-product-tag.in-stock {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.cart-product-tag.low-stock {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

/* Preço Unitário */
.cart-product-price {
    padding: 1.25rem;
    text-align: center;
    border-left: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.cart-price-label {
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cart-price-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--gray-800);
}

.cart-price-value small {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Controle de Quantidade */
.cart-product-quantity {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--gray-100);
}

.cart-qty-label {
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.cart-qty-control {
    display: flex;
    align-items: center;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    padding: 0.35rem;
    gap: 0.25rem;
}

.cart-qty-control input {
    width: 55px;
    border: none;
    background: white;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 6px;
    padding: 0.5rem;
    color: var(--gray-800);
}

.cart-qty-control input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-light);
}

.cart-qty-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.cart-qty-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.cart-qty-btn.update-btn {
    background: var(--success-color);
}

.cart-qty-btn.update-btn:hover {
    background: #059669;
}

/* Subtotal e Ações */
.cart-product-actions {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    border-left: 1px solid var(--gray-100);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
}

.cart-subtotal {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.cart-subtotal-label {
    font-size: 0.65rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    display: block;
}

.cart-subtotal-value {
    font-size: 1.4rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1.2;
}

.cart-remove-btn {
    background: transparent;
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cart-remove-btn:hover {
    background: var(--danger-color);
    color: white;
    transform: scale(1.05);
}

/* ============================================================================
   CAMPOS CUSTOMIZADOS DO PRODUTO - DESIGN APRIMORADO
   ============================================================================ */

.cart-custom-fields-section {
    border-top: 2px dashed var(--gray-200);
    background: linear-gradient(180deg, var(--gray-50) 0%, white 100%);
    padding: 0;
    margin-top: 0;
}

.cart-custom-fields-header {
    background: linear-gradient(135deg, var(--info-color) 0%, #2563eb 100%);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.cart-custom-fields-header i {
    font-size: 1.1rem;
}

.cart-custom-fields-body {
    padding: 1.5rem;
}

.cart-custom-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.cart-custom-field-item {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    padding: 1rem 1.25rem;
    transition: var(--transition);
}

.cart-custom-field-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.cart-custom-field-item:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.cart-custom-field-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.cart-custom-field-label .required-mark {
    color: var(--danger-color);
    font-weight: 700;
}

.cart-custom-field-label i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

.cart-custom-field-input {
    width: 100%;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--gray-50);
}

.cart-custom-field-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.cart-custom-field-input.is-invalid {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.05);
}

.cart-custom-field-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* ============================================================================
   RESUMO DO PEDIDO - SIDEBAR
   ============================================================================ */

.cart-summary-card {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 2rem;
    overflow: hidden;
}

.cart-summary-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1.25rem 1.5rem;
}

.cart-summary-title {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.cart-summary-title i {
    font-size: 1.3rem;
}

.cart-summary-body {
    padding: 1.5rem;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.cart-summary-row:last-of-type {
    border-bottom: none;
}

.cart-summary-label {
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-summary-value {
    color: var(--gray-900);
    font-weight: 700;
    font-size: 1rem;
}

.cart-summary-value.free {
    color: var(--success-color);
}

.cart-summary-row.total-row {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    margin: 1rem -1.5rem 0;
    padding: 1.25rem 1.5rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    border: none;
}

.cart-summary-row.total-row .cart-summary-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
}

.cart-summary-row.total-row .cart-summary-value {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Seção de Saldo */
.cart-balance-section {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.08) 100%);
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

.cart-balance-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.cart-balance-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--success-color);
    cursor: pointer;
}

.cart-balance-label {
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-balance-label i {
    color: var(--success-color);
}

.cart-balance-amount {
    background: var(--success-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================================================
   BOTÕES DE PAGAMENTO
   ============================================================================ */

.cart-payment-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1.5rem;
}

.cart-payment-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.cart-payment-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.cart-payment-btn:hover::before {
    left: 100%;
}

.cart-payment-btn:hover {
    transform: translateY(-3px);
}

.cart-payment-btn.btn-pix {
    background: linear-gradient(135deg, var(--pix-color) 0%, #00a896 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 184, 169, 0.3);
}

.cart-payment-btn.btn-pix:hover {
    box-shadow: 0 8px 25px rgba(0, 184, 169, 0.4);
}

.cart-payment-btn.btn-card {
    background: linear-gradient(135deg, var(--info-color) 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.cart-payment-btn.btn-card:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.cart-payment-btn.btn-balance {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.cart-payment-btn.btn-balance:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.cart-payment-btn.btn-manual {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.cart-payment-btn.btn-manual:hover {
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.cart-payment-btn.btn-free {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.cart-payment-btn.btn-free:hover {
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

/* Botão Continuar Comprando */
.cart-continue-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    background: var(--gray-100);
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    margin-top: 1rem;
}

.cart-continue-btn:hover {
    background: var(--gray-200);
    color: var(--gray-800);
    border-color: var(--gray-300);
}

/* Segurança */
.cart-security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-top: 1rem;
    border-top: 1px solid var(--gray-100);
}

.cart-security-badge i {
    color: var(--success-color);
}

/* ============================================================================
   CARRINHO VAZIO
   ============================================================================ */

.cart-empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background: white;
    border-radius: var(--border-radius);
    border: 2px dashed var(--gray-200);
    animation: fadeIn 0.5s ease-out;
}

.cart-empty-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

.cart-empty-icon i {
    font-size: 3.5rem;
    color: var(--gray-400);
}

.cart-empty-state h4 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
}

.cart-empty-state p {
    color: var(--gray-500);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.cart-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--primary-gradient);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.cart-empty-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    color: white;
}

/* ============================================================================
   ALERTAS E NOTIFICAÇÕES
   ============================================================================ */

.cart-alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.cart-alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.cart-alert.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.cart-alert.alert-success i {
    color: var(--success-color);
}

.cart-alert.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #92400e;
}

.cart-alert.alert-warning i {
    color: var(--warning-color);
}

.cart-alert.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #1e40af;
}

.cart-alert.alert-info i {
    color: var(--info-color);
}

/* ============================================================================
   ANIMAÇÕES
   ============================================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.4s ease-out;
}

/* ============================================================================
   RESPONSIVIDADE
   ============================================================================ */

@media (max-width: 1024px) {
    .cart-main-wrapper {
        padding: 0 1rem;
    }
    
    .cart-summary-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-page-container {
        padding: 1.5rem 0 3rem;
    }
    
    .cart-page-header h2 {
        font-size: 1.5rem;
    }
    
    .cart-page-header h2 i {
        font-size: 1.75rem;
    }
    
    /* Layout responsivo do produto no carrinho */
    .cart-product-grid {
        display: grid;
        grid-template-columns: 100px 1fr;
        grid-template-rows: auto auto;
        gap: 0;
    }
    
    .cart-product-image-wrapper {
        grid-row: 1 / 2;
        grid-column: 1 / 2;
        min-height: auto;
        padding: 1rem;
        margin-top: 8px; /* Espaço para não pegar na linha de efeito */
    }
    
    .cart-product-image {
        width: 80px;
        height: 80px;
    }
    
    .cart-product-info {
        grid-row: 1 / 2;
        grid-column: 2 / 3;
        border-left: none;
        border-top: none;
        padding: 1rem 1rem 0.5rem 0.5rem;
        margin-top: 8px; /* Espaço para não pegar na linha de efeito */
    }
    
    .cart-product-name {
        font-size: 0.95rem;
        -webkit-line-clamp: 2;
        line-height: 1.3;
        margin-bottom: 0.25rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .cart-product-description {
        display: none; /* Ocultar descrição em mobile para economizar espaço */
    }
    
    .cart-product-meta {
        margin-top: 0.25rem;
    }
    
    .cart-product-tag {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Grid para preço, quantidade e ações em mobile */
    .cart-product-price,
    .cart-product-quantity,
    .cart-product-actions {
        border-left: none;
        border-top: 1px solid var(--gray-100);
    }
    
    /* Container para preço/quantidade/ações em linha */
    .cart-product-price {
        grid-column: 1 / 3;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        background: var(--gray-50);
    }
    
    .cart-price-label {
        margin-bottom: 0;
        margin-right: 0.5rem;
    }
    
    .cart-price-value {
        font-size: 1.1rem;
    }
    
    .cart-product-quantity {
        grid-column: 1 / 3;
        flex-direction: row;
        justify-content: space-between;
        padding: 0.75rem 1rem;
    }
    
    .cart-qty-label {
        margin-bottom: 0;
    }
    
    .cart-product-actions {
        grid-column: 1 / 3;
        flex-direction: row;
        justify-content: space-between;
        padding: 0.75rem 1rem;
    }
    
    .cart-subtotal {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .cart-subtotal-label {
        margin-bottom: 0;
    }
    
    .cart-subtotal-value {
        font-size: 1.15rem;
    }
    
    /* Layout mobile em grid 2x2 */
    .cart-product-mobile-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    
    .cart-custom-fields-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-summary-row.total-row {
        margin: 1rem -1rem 0;
        padding: 1rem;
    }
    
    /* Melhorar alerta de informações necessárias */
    .product-custom-fields-container .alert-info {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
        margin: 0.5rem;
        border-radius: 12px;
        background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
        border: 2px solid #3b82f6;
        border-left: 2px solid #3b82f6;
    }
    
    .product-custom-fields-container .alert-info i {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .product-custom-fields-container .alert-info strong {
        font-size: 0.85rem;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .cart-page-container {
        padding: 1rem 0 2rem;
    }
    
    .cart-main-wrapper {
        padding: 0 0.5rem;
    }
    
    .cart-page-header h2 {
        font-size: 1.25rem;
        gap: 0.5rem;
    }
    
    .cart-product-card {
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    /* Layout ainda mais compacto para telas pequenas */
    .cart-product-grid {
        grid-template-columns: 85px 1fr;
    }
    
    .cart-product-image-wrapper {
        padding: 0.75rem;
    }
    
    .cart-product-image {
        width: 70px;
        height: 70px;
    }
    
    .cart-product-info {
        padding: 0.75rem 0.75rem 0.5rem 0.5rem;
    }
    
    .cart-product-name {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
        line-height: 1.25;
    }
    
    .cart-product-tag {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
    }
    
    .cart-price-value,
    .cart-subtotal-value {
        font-size: 1rem;
    }
    
    .cart-qty-control input {
        width: 40px;
        font-size: 0.85rem;
        padding: 0.4rem;
    }
    
    .cart-qty-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .cart-remove-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .cart-product-price,
    .cart-product-quantity,
    .cart-product-actions {
        padding: 0.6rem 0.75rem;
    }
    
    /* Melhorar alerta de informações em telas pequenas */
    .product-custom-fields-container {
        padding: 0.75rem;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .product-custom-fields-container .alert-info {
        padding: 0.75rem;
        margin: 0.25rem;
    }
    
    .product-custom-fields-container .alert-info i {
        font-size: 1.25rem;
    }
    
    .product-custom-fields-container .alert-info strong {
        font-size: 0.8rem;
    }
    
    .cart-payment-btn {
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
    }
    
    .cart-summary-header {
        padding: 1rem;
    }
    
    .cart-summary-body {
        padding: 1rem;
    }
}

/* ============================================================================
   CAMPOS CUSTOMIZADOS - DESIGN MODERNO EM GRID
   ============================================================================ */

.product-custom-fields-container {
    margin-top: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px dashed var(--gray-200);
    animation: fadeInUp 0.4s ease-out;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 0 0 16px 16px;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    margin-bottom: -1.5rem;
}

.product-custom-fields-container .alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    border: 2px solid #3b82f6; /* Borda completa para melhor visibilidade */
    border-left: 6px solid #2563eb;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.product-custom-fields-container .alert-info i {
    color: #0ea5e9;
    font-size: 1.1rem;
}

.product-custom-fields-container .alert-info strong {
    color: #1e40af;
    font-weight: 700;
    font-size: 1rem;
}

/* Grid de Campos Customizados */
.custom-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    padding: 0.5rem;
}

/* Card Individual do Campo */
.custom-field-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.custom-field-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-field-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.custom-field-card:hover::before {
    opacity: 1;
}

.custom-field-card:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.custom-field-card:focus-within::before {
    opacity: 1;
}

/* Label do Campo */
.custom-field-label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.custom-field-label i {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-radius: 6px;
    font-size: 0.7rem;
}

.custom-field-label span {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Wrapper do Input */
.custom-field-input-wrapper {
    position: relative;
}

/* Input do Campo */
.custom-field-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-800);
    background: white;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.custom-field-input::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}

.custom-field-input:hover {
    border-color: var(--gray-300);
}

.custom-field-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: white;
}

/* Estado de Erro */
.custom-field-input.is-invalid {
    border-color: #ef4444 !important;
    background-color: #fef2f2;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.custom-field-card:has(.is-invalid) {
    border-color: #ef4444;
}

.custom-field-card:has(.is-invalid)::before {
    background: linear-gradient(90deg, #ef4444, #f87171);
    opacity: 1;
}

/* Ícones específicos por tipo */
.custom-field-label i.fa-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.custom-field-label i.fa-envelope {
    background: linear-gradient(135deg, #ea4335, #fbbc05);
}

.custom-field-label i.fa-desktop,
.custom-field-label i.fa-tv {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.custom-field-label i.fa-key {
    background: linear-gradient(135deg, #f59e0b, #eab308);
}

.custom-field-label i.fa-user-tag {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
}

.custom-field-label i.fa-mobile-alt {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.custom-field-label i.fa-phone {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* Responsividade dos Campos */
@media (max-width: 768px) {
    .product-custom-fields-container {
        margin-left: -1rem;
        margin-right: -1rem;
        padding: 1.25rem;
    }
    
    .custom-fields-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0.25rem;
    }
    
    .custom-field-card {
        padding: 1rem;
    }
    
    .custom-field-label {
        font-size: 0.65rem;
        flex-wrap: wrap;
    }
    
    .custom-field-label i {
        width: 22px;
        height: 22px;
        font-size: 0.6rem;
        flex-shrink: 0;
    }
    
    .custom-field-input {
        padding: 0.625rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .custom-fields-grid {
        grid-template-columns: 1fr;
    }
}

/* Animação de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   FIM DO CSS DO CARRINHO MODERNO
   ============================================================================ */
