/**
 * CARRINHO/SACOLINHA - CSS MOBILE
 * Layout otimizado para dispositivos móveis (320px-768px)
 */

/* ========================================
   BADGE FLUTUANTE - MOBILE
   ======================================== */

.badge-carrinho {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FF6B35 0%, #E85A2A 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    z-index: 99;
    transition: all 0.3s ease;
    flex-direction: column;
    gap: 2px;
}

.badge-carrinho:active {
    transform: scale(0.95);
}

.badge-numero {
    font-size: 14px;
    font-weight: bold;
    color: white;
    line-height: 1;
}

.badge-icone {
    font-size: 24px;
    line-height: 1;
}

/* ========================================
   OVERLAY - MOBILE
   ======================================== */

.overlay-carrinho {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    animation: fadeIn 0.3s ease;
}

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

/* ========================================
   MODAL DO CARRINHO - MOBILE
   ======================================== */

.modal-carrinho {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 85vh;
    background: white;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    z-index: 101;
    animation: slideUp 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-carrinho-conteudo {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ========================================
   HEADER DO MODAL - MOBILE
   ======================================== */

.modal-carrinho-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #f5f5f5;
    background: white;
}

.modal-carrinho-header h2 {
    font-size: 20px;
    color: #333;
    margin: 0;
}

.btn-fechar-carrinho {
    background: #f5f5f5;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-fechar-carrinho:active {
    background: #e0e0e0;
    transform: scale(0.95);
}

/* ========================================
   ITENS DO CARRINHO - MOBILE
   ======================================== */

.modal-carrinho-itens {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ddd #f5f5f5;
}

.modal-carrinho-itens::-webkit-scrollbar {
    width: 6px;
}

.modal-carrinho-itens::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.modal-carrinho-itens::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.item-carrinho {
    display: grid;
    grid-template-columns: 70px 1fr 30px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 10px;
    border-left: 4px solid #FF6B35;
}

.item-carrinho-imagem {
    width: 70px;
    height: 70px;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-carrinho-imagem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-carrinho-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-carrinho-info h4 {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-carrinho-info small {
    font-size: 11px;
    color: #999;
}

.item-carrinho-quantidade {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border-radius: 6px;
    padding: 4px;
    border: 1px solid #e0e0e0;
}

.btn-qtd {
    width: 24px;
    height: 24px;
    border: none;
    background: white;
    color: #FF6B35;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-qtd:active {
    background: #f5f5f5;
}

.item-carrinho-quantidade input {
    width: 24px;
    text-align: center;
    border: none;
    background: white;
    font-size: 12px;
    font-weight: bold;
    color: #333;
    padding: 0;
}

.item-carrinho-quantidade input::-webkit-outer-spin-button,
.item-carrinho-quantidade input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.item-carrinho-quantidade input[type=number] {
    -moz-appearance: textfield;
}

.item-carrinho-remover {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remover {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-remover:active {
    transform: scale(1.2);
}

/* ========================================
   ESTADO VAZIO - MOBILE
   ======================================== */

.modal-carrinho-vazio {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex: 1;
    color: #999;
}

.vazio-icone {
    font-size: 60px;
    opacity: 0.5;
}

.modal-carrinho-vazio p {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.modal-carrinho-vazio small {
    font-size: 13px;
    color: #999;
}

/* ========================================
   RESUMO - MOBILE
   ======================================== */

.modal-carrinho-resumo {
    padding: 15px;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.resumo-linha {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.resumo-linha strong {
    color: #FF6B35;
    font-size: 16px;
}

/* ========================================
   BOTÕES DE AÇÃO - MOBILE
   ======================================== */

.modal-carrinho-acoes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.btn-limpar-carrinho,
.btn-fazer-pedido {
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-limpar-carrinho {
    background: #f5f5f5;
    color: #666;
}

.btn-limpar-carrinho:active {
    background: #e0e0e0;
    transform: scale(0.98);
}

.btn-fazer-pedido {
    background: linear-gradient(135deg, #25d366 0%, #1fb855 100%);
    color: white;
    min-height: 48px;
}

.btn-fazer-pedido:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* ========================================
   NOTIFICAÇÕES - MOBILE
   ======================================== */

.notificacao-carrinho {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    z-index: 200;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.notificacao-carrinho.mostrar {
    opacity: 1;
    transform: translateY(0);
}
