/* ============================================
   BLOCO 1 - RESET E CONFIGURAÇÕES BÁSICAS
   ============================================ */

* {
    box-sizing: border-box;
}

body {
    background: #f3f9fb;
    font-family: 'Poppins', sans-serif;
    color: #2b3d4f;
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ============================================
   BLOCO 2 - HEADER DO CARRINHO
   ============================================ */

.carrinho-header {
    position: relative;
    margin-bottom: 2rem;
    padding: 0;
    background: linear-gradient(135deg, #6ac5ca 0%, #4ba3a8 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(106, 197, 202, 0.15);
    transform: translateZ(0);
}

.carrinho-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: headerShine 6s infinite;
    pointer-events: none;
}

@keyframes headerShine {
    0% { left: -100%; opacity: 0; }
    50% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

.carrinho-header-content {
    position: relative;
    padding: 2.5rem 2rem;
    text-align: center;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.carrinho-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    animation: floatGentle 4s ease-in-out infinite;
    transform: translateZ(0);
}

@keyframes floatGentle {
    0%, 100% { transform: translateY(0px) translateZ(0); }
    50% { transform: translateY(-2px) translateZ(0); }
}

.carrinho-header-icon i {
    font-size: 2rem;
    color: #ffffff;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.4));
}

.carrinho-header h1 {
    font-family: 'Playfair Display', serif;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 2rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    letter-spacing: -0.5px;
}

.carrinho-header p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 300;
}

/* ============================================
   BLOCO 3 - GRID PRINCIPAL DO CARRINHO
   ============================================ */

.carrinho-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.carrinho-esquerda {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.carrinho-direita {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
}

/* ============================================
   BLOCO 4 - CARDS E SEÇÕES
   ============================================ */

.secao-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(106, 197, 202, 0.12);
    border: 1px solid #e8f5f6;
    transition: all 0.2s ease;
    transform: translateZ(0);
}

.secao-card:hover {
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 6px 20px rgba(106, 197, 202, 0.18);
}

.secao-card h4, .secao-card h5 {
    color: #6ac5ca;
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
}

/* ============================================
   BLOCO 5 - PRODUTOS DO CARRINHO
   ============================================ */

.produto-item {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e8f5f6;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    align-items: center;
    background: #ffffff;
    transition: all 0.2s ease;
}

.produto-item:hover {
    box-shadow: 0 3px 15px rgba(106, 197, 202, 0.12);
    transform: translateY(-1px) translateZ(0);
    border-color: #d1f0f1;
}

.produto-imagem {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e8f5f6;
    object-position: center;
    flex-shrink: 0;
}

.produto-info h6 {
    margin-bottom: 0.4rem;
    color: #2b3d4f;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
}

.produto-preco {
    color: #6ac5ca;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.tamanho-badge {
    background: linear-gradient(135deg, #f5c8d0 0%, #f0b7c1 100%);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid #e8f5f6;
    margin-top: 0.4rem;
    display: inline-block;
    color: #2b3d4f;
    font-weight: 500;
}

.quantidade-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.quantidade-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #6ac5ca;
    background: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6ac5ca;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.quantidade-btn:hover {
    background: #6ac5ca;
    color: #ffffff;
    transform: scale(1.05) translateZ(0);
}

.quantidade-valor {
    font-weight: 600;
    color: #2b3d4f;
    min-width: 18px;
    text-align: center;
    font-size: 0.9rem;
}

/* ============================================
   BLOCO 6 - SISTEMA DE FRETE (CORES MOON KIDS)
   ============================================ */

.frete-calculadora {
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbfd 0%, #f0f8f9 100%);
    padding: 1rem;
    border: 1px solid #d1f0f1;
    margin-bottom: 1rem;
}

.frete-input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.frete-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1f0f1;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #ffffff;
    font-family: 'Poppins', sans-serif;
}

.frete-input:focus {
    outline: none;
    border-color: #6ac5ca;
    box-shadow: 0 0 0 2px rgba(106, 197, 202, 0.1);
    background: #f8fbfd;
}

.frete-input.is-valid {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8fff8 0%, #f0fff0 100%);
}

.frete-input.is-invalid {
    border-color: #ff9d66;
    background: linear-gradient(135deg, #fff8f5 0%, #ffeee5 100%);
}

.btn-calcular-frete {
    background: linear-gradient(135deg, #6ac5ca 0%, #4ba3a8 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
    min-width: 110px;
    font-size: 0.9rem;
}

.btn-calcular-frete:hover:not(:disabled) {
    background: linear-gradient(135deg, #4ba3a8 0%, #6ac5ca 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(106, 197, 202, 0.25);
}

.btn-calcular-frete:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================
   BLOCO 7 - OPÇÕES DE FRETE (MOON KIDS STYLE)
   ============================================ */

.frete-opcoes {
    margin-top: 1rem;
    animation: fadeInUp 0.4s ease;
    display: none;
}

.frete-opcoes.ativo {
    display: block;
}

.frete-opcao {
    border: 2px solid #d1f0f1;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(106, 197, 202, 0.08);
}

.frete-opcao::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(106, 197, 202, 0.08), transparent);
    transition: left 0.4s ease;
    pointer-events: none;
}

.frete-opcao:hover {
    border-color: #6ac5ca;
    box-shadow: 0 6px 20px rgba(106, 197, 202, 0.15);
    transform: translateY(-1px);
}

.frete-opcao:hover::before {
    left: 100%;
}

.frete-opcao.selecionada {
    border-color: #6ac5ca;
    background: linear-gradient(135deg, #f8fbfd 0%, #f0f8f9 100%);
    box-shadow: 0 6px 20px rgba(106, 197, 202, 0.2);
}

.frete-opcao.selecionada::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 12px;
    background: #6ac5ca;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    animation: checkMark 0.3s ease;
}

@keyframes checkMark {
    from { 
        transform: scale(0) rotate(-180deg); 
        opacity: 0; 
    }
    to { 
        transform: scale(1) rotate(0deg); 
        opacity: 1; 
    }
}

.frete-opcao-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.frete-icone {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.frete-info {
    flex: 1;
}

.frete-info h6 {
    margin: 0 0 0.2rem 0;
    color: #2b3d4f;
    font-weight: 600;
    font-size: 1rem;
    font-family: 'Playfair Display', serif;
}

.frete-preco {
    color: #6ac5ca;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
}

.frete-prazo {
    color: #607489;
    font-size: 0.85rem;
    margin: 0.4rem 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.frete-prazo i {
    color: #6ac5ca;
}

.frete-descricao {
    color: #607489;
    font-size: 0.8rem;
    margin: 0.4rem 0;
    font-style: italic;
}

.frete-detalhes {
    background: linear-gradient(135deg, #f0f8f9 0%, #e8f5f6 100%);
    border: 1px solid #6ac5ca;
    border-radius: 6px;
    padding: 0.6rem;
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: #4ba3a8;
    line-height: 1.4;
}

/* Cores específicas por tipo de frete */
.frete-opcao[onclick*="retirada"] .frete-icone {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.frete-opcao[onclick*="sedex"] .frete-icone {
    background: linear-gradient(135deg, #6ac5ca 0%, #4ba3a8 100%);
}

/* ============================================
   BLOCO 8 - ESTADOS DE LOADING E ERRO
   ============================================ */

.frete-loading {
    text-align: center;
    padding: 1.5rem 1rem;
    color: #607489;
    background: linear-gradient(135deg, #f8fbfd 0%, #f0f8f9 100%);
    border-radius: 8px;
    border: 1px solid #d1f0f1;
}

.frete-loading i {
    font-size: 2rem;
    color: #6ac5ca;
    animation: freteLoadingPulse 1.2s ease-in-out infinite;
    margin-bottom: 0.75rem;
}

@keyframes freteLoadingPulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
        opacity: 0.7;
    }
    50% { 
        transform: scale(1.05) rotate(180deg); 
        opacity: 1;
    }
}

.frete-loading p {
    margin: 0;
    font-weight: 500;
    color: #2b3d4f;
    font-size: 0.9rem;
}

.frete-erro {
    background: linear-gradient(135deg, #fff5f2 0%, #ffe8e0 100%);
    border: 1px solid #ff9d66;
    color: #cc5200;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    margin-top: 1rem;
    font-weight: 500;
    animation: shake 0.4s ease-in-out;
    font-size: 0.9rem;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-1px); }
    75% { transform: translateX(1px); }
}

/* ============================================
   BLOCO 9 - FORMULÁRIOS E VALIDAÇÃO
   ============================================ */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    color: #2b3d4f;
    font-weight: 500;
    font-size: 0.85rem;
}

.form-control {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #d1f0f1;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-control:focus {
    outline: none;
    border-color: #6ac5ca;
    box-shadow: 0 0 0 2px rgba(106, 197, 202, 0.1);
}

.form-control.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.48-.31 1.41-1.41a.75.75 0 1 1 1.06 1.06l-1.89 1.89a.75.75 0 0 1-1.06 0l-.89-.89a.75.75 0 1 1 1.06-1.06l.83.83z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 14px 10px;
}

.form-control.is-invalid {
    border-color: #ff9d66;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23ff9d66'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4M7.2 4.6l-1.4 1.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 14px 10px;
}

.form-feedback {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-feedback.valid {
    color: #28a745;
}

.form-feedback.valid::before {
    content: '✓';
    display: inline-block;
    width: 14px;
    height: 14px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 0.65rem;
    line-height: 14px;
}

.form-feedback.invalid {
    color: #cc5200;
}

.form-feedback.invalid::before {
    content: '✗';
    display: inline-block;
    width: 14px;
    height: 14px;
    background: #ff9d66;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 0.65rem;
    line-height: 14px;
}

/* ============================================
   BLOCO 10 - RESUMO DO PEDIDO
   ============================================ */

.resumo-secao {
    background: #ffffff;
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #d1f0f1;
    box-shadow: 0 2px 8px rgba(106, 197, 202, 0.06);
}

.resumo-linha {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    color: #2b3d4f;
    font-size: 0.9rem;
}

.resumo-linha:last-child {
    margin-bottom: 0;
}

.resumo-linha.subtotal {
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #d1f0f1;
    color: #2b3d4f;
    font-weight: 600;
}

.resumo-linha.frete {
    color: #607489;
    font-weight: 500;
}

.resumo-linha.frete.gratis {
    color: #28a745 !important;
    font-weight: 700;
    background: linear-gradient(135deg, #f0fff0 0%, #e8f5e8 100%);
    border-radius: 4px;
    padding: 0.4rem;
    margin: 0.4rem 0;
    border-left: 3px solid #28a745;
    animation: highlightGreen 0.4s ease;
}

@keyframes highlightGreen {
    0% {
        background: #28a745;
        color: white;
    }
    100% {
        background: linear-gradient(135deg, #f0fff0 0%, #e8f5e8 100%);
        color: inherit;
    }
}

.resumo-linha.total {
    border-top: 2px solid #6ac5ca;
    padding-top: 0.6rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: #ffffff !important;
    margin-top: 0.6rem;
    background: linear-gradient(135deg, #6ac5ca 0%, #4ba3a8 100%);
    border-radius: 6px;
    padding: 0.9rem;
    position: relative;
    transition: all 0.3s ease;
}

.resumo-linha.total span,
.resumo-linha.total strong,
#total-display,
#total-display strong,
.resumo-linha.total i {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.resumo-linha.total::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ffffff 0%, rgba(255,255,255,0.3) 50%, #ffffff 100%);
    border-radius: 6px 6px 0 0;
}

.resumo-linha.total.atualizado {
    animation: totalUpdate 0.4s ease;
}

@keyframes totalUpdate {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(106, 197, 202, 0.06);
    }
    50% {
        transform: scale(1.01);
        box-shadow: 0 6px 20px rgba(106, 197, 202, 0.2);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(106, 197, 202, 0.06);
    }
}

.resumo-desconto {
    background: linear-gradient(135deg, #f0fff0 0%, #e8f5e8 100%);
    border: 1px solid #c3e6c3;
    border-radius: 4px;
    padding: 0.6rem;
    margin: 0.6rem 0;
    color: #155724;
    font-size: 0.8rem;
}

.resumo-economia {
    color: #28a745;
    font-weight: 600;
}

/* ============================================
   BLOCO 11 - MÉTODOS DE PAGAMENTO
   ============================================ */

.metodo-card {
    border: 2px solid #d1f0f1;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
}

.metodo-card:hover {
    border-color: #6ac5ca;
    box-shadow: 0 4px 15px rgba(106, 197, 202, 0.12);
    transform: translateY(-1px);
}

.metodo-card.selecionado {
    border-color: #6ac5ca;
    background: linear-gradient(135deg, #f8fbfd 0%, #f0f8f9 100%);
    box-shadow: 0 4px 15px rgba(106, 197, 202, 0.15);
}

.metodo-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.metodo-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.metodo-header strong {
    color: #2b3d4f;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 0.95rem;
}

.metodo-header small {
    color: #607489;
    font-size: 0.8rem;
}

/* ============================================
   BLOCO 12 - BOTÕES PRINCIPAIS
   ============================================ */

.btn-finalizar {
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: #607489;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-finalizar:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4th 15px rgba(106, 197, 202, 0.12);
}

.btn-finalizar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-finalizar.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.btn-finalizar.online {
    background: linear-gradient(135deg, #6ac5ca 0%, #4ba3a8 100%);
}

.btn-primary {
    background: linear-gradient(135deg, #6ac5ca 0%, #4ba3a8 100%);
    border: none;
    border-radius: 6px;
    padding: 0.7rem 1.5rem;
    color: #ffffff;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(106, 197, 202, 0.12);
    color: #ffffff;
}

/* ============================================
   BLOCO 12 - BOTÕES PRINCIPAIS (CONTINUAÇÃO)
   ============================================ */

.btn-outline-danger {
    border: 1px solid #ff9d66;
    color: #ff9d66;
    background: transparent;
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.btn-outline-danger:hover {
    background: #ff9d66;
    color: #ffffff;
}

/* ============================================
   BLOCO 13 - CARRINHO VAZIO
   ============================================ */

.carrinho-vazio {
    text-align: center;
    padding: 3rem 2rem;
    color: #607489;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(106, 197, 202, 0.12);
}

.carrinho-vazio i {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #d1f0f1;
}

.carrinho-vazio h3 {
    color: #6ac5ca;
    font-family: 'Playfair Display', serif;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* ============================================
   BLOCO 14 - ALERTAS E MENSAGENS
   ============================================ */

.alert-warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border: 1px solid #ff9800;
    color: #e65100;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-success {
    background: linear-gradient(135deg, #f0fff0 0%, #e8f5e8 100%);
    border: 1px solid #4caf50;
    color: #2e7d32;
    padding: 1rem;
    border-radius: 6px;
}

.alert-info {
    background: linear-gradient(135deg, #f0f8f9 0%, #e8f5f6 100%);
    border: 1px solid #6ac5ca;
    color: #4ba3a8;
    padding: 0.9rem;
    border-radius: 6px;
    font-size: 0.85rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-info i {
    color: #6ac5ca;
    margin-right: 0.4rem;
}

/* ============================================
   BLOCO 15 - ENDEREÇO DE ENTREGA
   ============================================ */

.endereco-card {
    background: linear-gradient(135deg, #f8fbfd 0%, #f0f8f9 100%);
    border: 1px solid #d1f0f1;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.endereco-card h6 {
    color: #6ac5ca;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.endereco-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.endereco-grid.full {
    grid-template-columns: 1fr;
}

.form-group-inline {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.cep-grupo {
    display: flex;
    gap: 0.75rem;
    align-items: end;
}

.btn-buscar-cep {
    background: linear-gradient(135deg, #6ac5ca 0%, #4ba3a8 100%);
    border: none;
    color: white;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.85rem;
    height: fit-content;
}

.btn-buscar-cep:hover:not(:disabled) {
    background: linear-gradient(135deg, #4ba3a8 0%, #6ac5ca 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(106, 197, 202, 0.2);
}

.btn-buscar-cep:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.endereco-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6ac5ca;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.endereco-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.endereco-erro {
    background: linear-gradient(135deg, #fff5f2 0%, #ffe8e0 100%);
    border: 1px solid #ff9d66;
    color: #cc5200;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ============================================
   BLOCO 16 - ANIMAÇÕES E EFEITOS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.frete-opcoes .frete-opcao:nth-child(1) { animation-delay: 0.05s; }
.frete-opcoes .frete-opcao:nth-child(2) { animation-delay: 0.1s; }
.frete-opcoes .frete-opcao:nth-child(3) { animation-delay: 0.15s; }

.form-control.is-valid {
    animation: validSuccess 0.4s ease;
}

@keyframes validSuccess {
    0% { 
        background-color: #f0fff0; 
        transform: scale(1.01);
    }
    100% { 
        background-color: #ffffff; 
        transform: scale(1);
    }
}

/* Efeito especial para retirada grátis */
.frete-opcao[onclick*="retirada"] {
    position: relative;
}

.frete-opcao[onclick*="retirada"]::after {
    content: 'GRÁTIS';
    position: absolute;
    top: -6px;
    right: 12px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.25);
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-2px);
    }
    60% {
        transform: translateY(-1px);
    }
}

/* Efeito para sedex */
.frete-opcao[onclick*="sedex"] .frete-icone {
    animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    }
    50% {
        box-shadow: 0 3px 15px rgba(106, 197, 202, 0.3);
    }
}

/* ============================================
   BLOCO 17 - RESPONSIVIDADE MOBILE
   ============================================ */

@media (max-width: 768px) {
    /* Header mobile */
    .carrinho-header-content {
        padding: 1.5rem 1rem;
    }

    .carrinho-header h1 {
        font-size: 1.75rem;
    }

    .carrinho-header-icon {
        width: 50px;
        height: 50px;
    }

    .carrinho-header-icon i {
        font-size: 1.5rem;
    }

    /* Grid mobile */
    .carrinho-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .carrinho-direita {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
    
    /* Container mobile */
    .main-container {
        padding: 1rem 0.75rem;
    }

    .secao-card {
        padding: 1rem;
    }
    
    /* Produtos mobile */
    .produto-item {
        grid-template-columns: 50px 1fr;
        gap: 0.6rem;
        padding: 0.75rem;
    }

    .produto-imagem {
        width: 50px;
        height: 50px;
    }

    .produto-acoes {
        grid-column: 1 / -1;
        margin-top: 0.75rem;
        text-align: center;
    }
    
    /* Frete mobile */
    .frete-input-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-calcular-frete {
        width: 100%;
        padding: 0.85rem;
    }
    
    .frete-opcao {
        padding: 0.85rem;
    }
    
    .frete-opcao-header {
        gap: 0.6rem;
    }
    
    .frete-icone {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .frete-info h6 {
        font-size: 0.9rem;
    }
    
    .frete-preco {
        font-size: 1rem;
    }
    
    .frete-detalhes {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    /* Endereço mobile */
    .endereco-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .form-group-inline {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .cep-grupo {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-buscar-cep {
        width: 100%;
        padding: 0.75rem;
    }

    /* Total mobile */
    .resumo-linha.total {
        font-size: 1rem;
        padding: 0.7rem;
    }
    
    .resumo-secao {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    /* Extra mobile */
    .carrinho-header h1 {
        font-size: 1.5rem;
    }

    .carrinho-header-content {
        padding: 1.25rem 0.75rem;
    }

    .secao-card {
        padding: 0.85rem;
    }

    .produto-item {
        padding: 0.6rem;
    }

    .btn-finalizar {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .frete-opcao {
        padding: 0.7rem;
        margin-bottom: 0.75rem;
    }
    
    .frete-opcao-header {
        flex-direction: row;
        text-align: left;
    }
    
    .frete-icone {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .frete-loading {
        padding: 1.25rem 0.75rem;
    }
    
    .frete-loading i {
        font-size: 1.75rem;
    }

    .frete-opcao.selecionada::after {
        width: 18px;
        height: 18px;
        font-size: 10px;
        top: 6px;
        right: 8px;
    }
    
    .frete-detalhes {
        margin-top: 0.4rem;
        padding: 0.4rem;
        border-radius: 4px;
    }

    .resumo-linha.total {
        font-size: 0.95rem;
        padding: 0.6rem;
    }
    
    .resumo-secao {
        padding: 0.85rem;
    }

    .endereco-card {
        padding: 1rem;
    }
}

/* ============================================
   BLOCO 18 - MELHORIAS DE PERFORMANCE
   ============================================ */

.carrinho-header,
.carrinho-header-icon,
.produto-item,
.frete-opcao,
.metodo-card,
.btn-finalizar,
.secao-card,
.frete-loading,
.btn-calcular-frete {
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
}

.frete-opcoes {
    contain: layout style paint;
}

/* Remove animações em dispositivos que preferem movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    .carrinho-header::before,
    .carrinho-header-icon,
    .frete-opcao::before,
    .frete-opcao,
    .frete-loading i,
    .btn-calcular-frete,
    .alert-info {
        animation: none;
        transition: none;
    }
    
    .produto-item:hover,
    .frete-opcao:hover,
    .metodo-card:hover,
    .secao-card:hover {
        transform: none;
    }
    
    .btn-finalizar:hover,
    .btn-primary:hover {
        transform: none;
    }
}

/* ============================================
   BLOCO 19 - SCROLLBAR CUSTOMIZADA
   ============================================ */

.carrinho-direita::-webkit-scrollbar {
    width: 5px;
}

.carrinho-direita::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.carrinho-direita::-webkit-scrollbar-thumb {
    background: #6ac5ca;
    border-radius: 2px;
}

.carrinho-direita::-webkit-scrollbar-thumb:hover {
    background: #4ba3a8;
}

/* Para Firefox */
.carrinho-direita {
    scrollbar-width: thin;
    scrollbar-color: #6ac5ca #f1f1f1;
}

/* ============================================
   BLOCO 20 - ACESSIBILIDADE E TEMAS
   ============================================ */

@media (prefers-contrast: high) {
    .form-control {
        border-width: 2px;
    }
    
    .btn-finalizar {
        border: 2px solid currentColor;
    }
    
    .frete-opcao {
        border-width: 3px;
    }
}

/* Foco visível melhorado */
.form-control:focus,
.btn-finalizar:focus,
.frete-opcao:focus,
.metodo-card:focus {
    outline: 2px solid #6ac5ca;
    outline-offset: 1px;
}

.frete-opcao[tabindex]:focus {
    outline: 2px solid #6ac5ca;
    outline-offset: 1px;
}

/* ============================================
   BLOCO 21 - ESTADOS DE LOADING GLOBAIS
   ============================================ */

.loading {
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid #6ac5ca;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============================================
   BLOCO 22 - OTIMIZAÇÕES FINAIS
   ============================================ */

/* Remove will-change após animações para economizar memória */
.carrinho-header-icon:not(:hover),
.frete-opcao:not(:hover),
.produto-item:not(:hover) {
    will-change: auto;
}

/* Otimização para imagens */
.produto-imagem {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
}

/* Estados de hover avançados */
.frete-opcao:hover .frete-icone {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.frete-opcao:hover .frete-preco {
    color: #4ba3a8;
    transition: color 0.3s ease;
}

/* ============================================
   BLOCO 23 - UTILITÁRIOS
   ============================================ */

.text-center { text-align: center; }
.text-end { text-align: right; }
.text-start { text-align: left; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }

.fw-bold { font-weight: 700; }
.fs-6 { font-size: 1rem; }

/* ============================================
   BLOCO 24 - TRANSIÇÕES SUAVES GLOBAIS
   ============================================ */

button, 
input, 
select, 
textarea,
.frete-opcao,
.metodo-card,
.produto-item {
    transition: all 0.2s ease;
}

/* ============================================
   FIM DO CSS ORGANIZADO MOON KIDS
   ============================================ */