/*--------------------------------------------------------------
# SIDEBAR CARRINHO - MOON KIDS STORE (VERSÃO CORRIGIDA MOBILE)
--------------------------------------------------------------*/

:root {
  --sidebar-width: 420px;
  --sidebar-width-mobile: 100vw;
  --overlay-bg: rgba(0, 0, 0, 0.6);
  --sidebar-bg: #ffffff;
  --sidebar-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
  --primary-color: #6ac5ca;
  --primary-dark: #4ba3a8;
  --accent-color: #ff9d66;
  --text-color: #2b3d4f;
  --light-text: #607489;
  --border-color: #e0f2f3;
  --success-color: #27ae60;
  --error-color: #e74c3c;
  --warning-color: #f39c12;
  --light-bg: #f8f9fa;
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --border-radius: 12px;
  --border-radius-sm: 6px;
}

/*--------------------------------------------------------------
# Bloco 1 - Overlay
--------------------------------------------------------------*/
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-bg);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  backdrop-filter: blur(3px);
  pointer-events: none;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/*--------------------------------------------------------------
# Bloco 2 - Sidebar Principal (DESKTOP)
--------------------------------------------------------------*/
.sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  background: var(--sidebar-bg);
  z-index: 9999;
  transition: var(--transition);
  box-shadow: var(--sidebar-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  
  /* GARANTIR QUE FIQUE COMPLETAMENTE OCULTO */
  transform: translateX(100%);
  visibility: hidden;
}

.sidebar.active {
  right: 0;
  transform: translateX(0);
  visibility: visible;
}

/*--------------------------------------------------------------
# Bloco 3 - Header da Sidebar (Fixo)
--------------------------------------------------------------*/
.sidebar-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.sidebar-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.5px;
}

.sidebar-header h3 i {
  font-size: 22px;
  color: rgba(255, 255, 255, 0.9);
}

.close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 300;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/*--------------------------------------------------------------
# Bloco 4 - Conteúdo Scrollável
--------------------------------------------------------------*/
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  min-height: 0;
  margin: 0;
}

.sidebar-content::-webkit-scrollbar {
  width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/*--------------------------------------------------------------
# Bloco 5 - Itens do Carrinho - LAYOUT RESPONSIVO
--------------------------------------------------------------*/
.carrinho-itens {
  padding: 20px 15px;
  flex: 1;
}

.carrinho-vazio {
  text-align: center;
  padding: 60px 20px;
  color: var(--light-text);
  font-size: 16px;
  line-height: 1.6;
}

.carrinho-vazio::before {
  content: "🛒";
  display: block;
  font-size: 48px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.carrinho-erro {
  text-align: center;
  padding: 40px 20px;
  color: var(--error-color);
  font-size: 14px;
  line-height: 1.6;
}

.carrinho-erro::before {
  content: "⚠️";
  display: block;
  font-size: 32px;
  margin-bottom: 15px;
  opacity: 0.7;
}

/* LAYOUT PRINCIPAL DOS ITENS - RESPONSIVO */
.carrinho-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 12px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  transition: var(--transition);
  background: white;
  border-radius: var(--border-radius-sm);
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  min-height: 90px;
}

.carrinho-item:hover {
  background: rgba(106, 197, 202, 0.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.carrinho-item:last-child {
  border-bottom: none;
}

/* IMAGEM DO PRODUTO */
.carrinho-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--border-radius-sm);
  border: 2px solid var(--border-color);
  flex-shrink: 0;
  transition: var(--transition);
}

.carrinho-item:hover .carrinho-img {
  border-color: var(--primary-color);
  transform: scale(1.02);
}

/* DETALHES DO PRODUTO - OCUPA ESPAÇO DISPONÍVEL */
.carrinho-detalhes {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  justify-content: center;
  margin-top: 18px;
}

.carrinho-nome {
  font-weight: 600;
  color: var(--text-color);
  font-size: 15px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.carrinho-tamanho {
  font-size: 12px;
  color: var(--light-text);
  background: var(--light-bg);
  padding: 2px 6px;
  border-radius: 8px;
  display: inline-block;
  width: fit-content;
  margin: 0;
}

.carrinho-preco {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 13px;
  margin: 0;
}

/*--------------------------------------------------------------
# Bloco 6 - BOTÕES DE QUANTIDADE - SEMPRE À DIREITA
--------------------------------------------------------------*/
.carrinho-quantidade {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--light-bg);
  border-radius: 20px;
  padding: 4px 8px;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  margin-left: auto;
}

.carrinho-quantidade button {
  background: var(--primary-color);
  color: white;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.carrinho-quantidade button:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.carrinho-quantidade button:active {
  transform: scale(0.95);
}

.carrinho-quantidade span {
  font-weight: 600;
  color: var(--text-color);
  min-width: 20px;
  text-align: center;
  font-size: 12px;
  padding: 0 2px;
}

/*--------------------------------------------------------------
# Bloco 7 - BOTÃO REMOVER - POSICIONAMENTO FIXO
--------------------------------------------------------------*/
.carrinho-remover {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(231, 76, 60, 0.1);
  color: var(--error-color);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.carrinho-remover:hover {
  background: var(--error-color);
  color: white;
  transform: scale(1.1);
}

.carrinho-remover:active {
  transform: scale(0.9);
}

/*--------------------------------------------------------------
# Bloco 8 - ESTADOS ESPECIAIS DOS BOTÕES COM NOTIFICAÇÕES
--------------------------------------------------------------*/
.carrinho-quantidade button.limit-reached {
  background: linear-gradient(135deg, #ffa500, #ff8c00) !important;
  animation: pulse-warning 1s infinite;
  box-shadow: 0 0 10px rgba(255, 165, 0, 0.5);
}

@keyframes pulse-warning {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 0 5px rgba(255, 165, 0, 0.5); 
  }
  50% { 
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.8); 
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.carrinho-quantidade button.limit-reached:hover {
  background: linear-gradient(135deg, #ff8c00, #ffa500) !important;
}

/*--------------------------------------------------------------
# Bloco 9 - Botão Esvaziar Carrinho - ESTILIZADO
--------------------------------------------------------------*/
.btn-esvaziar-carrinho {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), rgba(231, 76, 60, 0.2));
  color: var(--error-color);
  border: 2px solid rgba(231, 76, 60, 0.3);
  padding: 12px 20px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  margin: 15px 15px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-esvaziar-carrinho:hover {
  background: linear-gradient(135deg, var(--error-color), #c0392b);
  color: white;
  border-color: var(--error-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-esvaziar-carrinho i {
  font-size: 16px;
}

/*--------------------------------------------------------------
# Bloco 10 - Subtotal (REMOVIDO TOTAL)
--------------------------------------------------------------*/
.subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: var(--light-bg);
  border-top: 1px solid var(--border-color);
  font-weight: 600;
  color: var(--text-color);
  flex-shrink: 0;
  font-size: 16px;
}

.subtotal span:last-child {
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 18px;
}

/*--------------------------------------------------------------
# Bloco 11 - Botão Finalizar Compra (PRINCIPAL)
--------------------------------------------------------------*/
.btn-finalizar-compra {
  background: linear-gradient(135deg, var(--accent-color), #e67e22);
  color: white;
  border: none;
  padding: 18px 25px;
  border-radius: var(--border-radius);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  width: calc(100% - 50px);
  margin: 20px 25px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(255, 157, 102, 0.3);
}

.btn-finalizar-compra:hover {
  background: linear-gradient(135deg, #e67e22, #d35400);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 157, 102, 0.5);
}

.btn-finalizar-compra:active {
  transform: translateY(0);
}

/*--------------------------------------------------------------
# Bloco 12 - Modais
--------------------------------------------------------------*/
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal {
  background: white;
  border-radius: var(--border-radius);
  padding: 0;
  max-width: 90vw;
  width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  overflow: hidden;
  position: relative;
  z-index: 10001;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  padding: 20px 25px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-header.success {
  background: linear-gradient(135deg, var(--success-color), #229954);
}

.modal-header.error {
  background: linear-gradient(135deg, var(--error-color), #cb4335);
}

.modal-header.warning {
  background: linear-gradient(135deg, var(--warning-color), #e67e22);
}

.modal-header i {
  font-size: 24px;
}

.modal-header h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.modal-body {
  padding: 25px;
  text-align: center;
}

.modal-body p {
  margin: 0 0 20px;
  color: var(--text-color);
  line-height: 1.6;
  font-size: 15px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 25px;
}

.modal-btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 100px;
}

.modal-btn.primary {
  background: var(--primary-color);
  color: white;
}

.modal-btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.modal-btn.danger {
  background: var(--error-color);
  color: white;
}

.modal-btn.danger:hover {
  background: #cb4335;
  transform: translateY(-2px);
}

.modal-btn.secondary {
  background: var(--light-bg);
  color: var(--text-color);
  border: 2px solid var(--border-color);
}

.modal-btn.secondary:hover {
  background: var(--border-color);
}

/*--------------------------------------------------------------
# Bloco 13 - Sistema de Toasts
--------------------------------------------------------------*/
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 0;
  pointer-events: none;
}

.toast {
  background: white;
  border-radius: var(--border-radius);
  padding: 15px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 400px;
  border-left: 4px solid var(--primary-color);
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.4, 0.0, 0.2, 1);
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  margin-bottom: 0;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.entering {
  transform: translateX(100%) scale(0.95);
  opacity: 0;
}

.toast.entering.show {
  transform: translateX(0) scale(1);
  opacity: 1;
}

.toast.removing {
  transform: translateX(100%) scale(0.95);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 1, 1);
}

.toast.success {
  border-left-color: var(--success-color);
}

.toast.error {
  border-left-color: var(--error-color);
}

.toast.warning {
  border-left-color: var(--warning-color);
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: var(--success-color);
}

.toast.error .toast-icon {
  color: var(--error-color);
}

.toast.warning .toast-icon {
  color: var(--warning-color);
}

.toast-message {
  flex: 1;
  color: var(--text-color);
  font-size: 14px;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: var(--light-text);
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.toast-close:hover {
  color: var(--text-color);
}

/*--------------------------------------------------------------
# Bloco 14 - Loading States
--------------------------------------------------------------*/
.loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 10;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/*--------------------------------------------------------------
# Bloco 15 - RESPONSIVIDADE MOBILE (CORRIGIDA)
--------------------------------------------------------------*/
@media (max-width: 768px) {
  .sidebar {
    /* MOBILE: FORÇAR POSICIONAMENTO CORRETO - SEM BRECHA */
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    right: auto !important;
    left: 100vw !important; /* FORÇAR PARA FORA DA TELA */
    height: 100vh !important;
    height: 100dvh !important;
    top: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    z-index: 99999 !important;
    
    /* GARANTIR QUE FIQUE TOTALMENTE OCULTO */
    transform: translateX(0) !important;
    transition: left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    visibility: hidden !important;
    
    /* ELIMINAR QUALQUER ESPAÇAMENTO QUE CAUSE BRECHA */
    border: none !important;
    outline: none !important;
    box-sizing: border-box !important;
  }
  
  .sidebar.active {
    left: 0 !important; /* MOVER PARA POSIÇÃO VISÍVEL */
    right: 0 !important; /* GARANTIR QUE OCUPE ATÉ A BORDA DIREITA */
    transform: translateX(0) !important;
    visibility: visible !important;
    width: 100vw !important;
    max-width: 100vw !important;
  }
  
  /* GARANTIR QUE O OVERLAY FUNCIONE NO MOBILE */
  .overlay {
    z-index: 99998 !important;
    display: none !important;
  }
  
  .overlay.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  .sidebar-header {
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 10;
    margin: 0;
    flex-shrink: 0 !important;
  }
  
  .sidebar-header h3 {
    font-size: 18px;
  }
  
  .sidebar-content {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: calc(100vh - 70px) !important;
    min-height: calc(100dvh - 70px) !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
  
  /* MOBILE - LAYOUT DOS ITENS */
  .carrinho-itens {
    padding: 12px 8px;
    margin: 0;
    padding-bottom: 15px;
  }
  
  .carrinho-item {
    padding: 10px 8px;
    gap: 8px;
    min-height: 55px;
    align-items: center;
  }
  
  .carrinho-img {
    width: 50px;
    height: 50px;
  }
  
  .carrinho-detalhes {
    flex: 1;
    gap: 2px;
    justify-content: center;
  }
  
  .carrinho-nome {
    font-size: 11px;
    line-height: 1.1;
  }
  
  .carrinho-tamanho {
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 6px;
  }
  
  .carrinho-preco {
    font-size: 11px;
  }
  
  .carrinho-quantidade {
    padding: 3px 6px;
    gap: 4px;
    border-radius: 15px;
  }
  
  .carrinho-quantidade button {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }
  
  .carrinho-quantidade span {
    font-size: 10px;
    min-width: 16px;
  }
  
  .carrinho-remover {
    width: 24px;
    height: 24px;
    top: 8px;
    right: 8px;
    font-size: 10px;
  }
  
  .subtotal {
    padding: 15px 20px;
    margin: 0;
    border-bottom: none;
  }
  
  .btn-esvaziar-carrinho {
    margin: 0 10px 15px;
    padding: 10px 15px;
    font-size: 13px;
  }
  
  .btn-finalizar-compra {
    margin: 15px 15px 20px;
    padding: 15px 20px;
    font-size: 15px;
    width: calc(100% - 30px);
  }
  
  .modal {
    width: 95vw;
    margin: 0 10px;
  }
  
  .modal-actions {
    flex-direction: column;
  }
  
  .modal-btn {
    width: 100%;
  }
  
  .toast {
    min-width: auto;
    max-width: calc(100vw - 40px);
    margin: 0 20px;
  }
  
  .toast-container {
    right: 0;
    left: 0;
    top: 10px;
  }
  
  /* FORÇAR VISIBILIDADE NO MOBILE */
  body.sidebar-open .sidebar {
    display: flex !important;
    visibility: visible !important;
    left: 0 !important;
  }
  
  body.sidebar-open .overlay {
    display: block !important;
    visibility: visible !important;
  }
  
  /* PREVENIR SCROLL DO BODY NO MOBILE */
  body.sidebar-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
  }
}

/*--------------------------------------------------------------
# Bloco 16 - MOBILE EXTRA PEQUENO (480px)
--------------------------------------------------------------*/
@media (max-width: 480px) {
  .sidebar {
    /* GARANTIR AINDA MAIS NO MOBILE PEQUENO */
    left: 100vw !important;
    width: 100vw !important;
  }
  
  .sidebar.active {
    left: 0 !important;
  }
  
  .sidebar-header {
    padding: 12px 15px;
  }
  
  .sidebar-content {
    height: auto;
    min-height: calc(100vh - 60px);
    min-height: calc(100dvh - 60px);
  }
  
  /* MOBILE PEQUENO - LAYOUT ULTRA COMPACTO */
  .carrinho-itens {
    padding: 8px 6px;
    margin: 0;
    padding-bottom: 12px;
  }
  
  .carrinho-item {
    gap: 6px;padding: 8px 6px;
    min-height: 50px;
  }
  
  .carrinho-img {
    width: 45px;
    height: 45px;
  }
  
  .carrinho-detalhes {
    gap: 1px;
  }
  
  .carrinho-nome {
    font-size: 10px;
    line-height: 1.0;
  }
  
  .carrinho-tamanho {
    font-size: 8px;
    padding: 1px 3px;
    border-radius: 4px;
  }
  
  .carrinho-preco {
    font-size: 10px;
  }
  
  .carrinho-quantidade {
    padding: 2px 4px;
    gap: 3px;
    border-radius: 12px;
  }
  
  .carrinho-quantidade button {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
  
  .carrinho-quantidade span {
    font-size: 9px;
    min-width: 14px;
  }
  
  .carrinho-remover {
    width: 22px;
    height: 22px;
    top: 6px;
    right: 6px;
    font-size: 9px;
  }
  
  .subtotal {
    padding: 12px 15px;
    font-size: 14px;
    margin: 0;
  }
  
  .btn-finalizar-compra {
    margin: 12px 12px 15px;
    padding: 12px 15px;
    font-size: 14px;
    width: calc(100% - 24px);
  }
  
  .btn-esvaziar-carrinho {
    margin: 0 8px 12px;
    padding: 8px 12px;
    font-size: 12px;
  }
}

/*--------------------------------------------------------------
# Bloco 17 - TABLET (769px - 1024px)
--------------------------------------------------------------*/
@media (min-width: 769px) and (max-width: 1024px) {
  .carrinho-item {
    padding: 16px 14px;
    gap: 14px;
    min-height: 65px;
  }
  
  .carrinho-img {
    width: 58px;
    height: 58px;
  }
  
  .carrinho-nome {
    font-size: 12px;
  }
  
  .carrinho-tamanho {
    font-size: 10px;
  }
  
  .carrinho-preco {
    font-size: 12px;
  }
  
  .carrinho-quantidade {
    padding: 5px 9px;
    gap: 7px;
  }
  
  .carrinho-quantidade button {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }
  
  .carrinho-quantidade span {
    font-size: 11px;
    min-width: 22px;
  }
}

/*--------------------------------------------------------------
# Bloco 18 - SEÇÃO DE FRETE (NOVA)
--------------------------------------------------------------*/
.frete-section {
  background: var(--light-bg);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin: 0;
  flex-shrink: 0;
}

.frete-header {
  padding: 15px 25px;
  background: linear-gradient(135deg, rgba(106, 197, 202, 0.1), rgba(106, 197, 202, 0.05));
  border-bottom: 1px solid rgba(106, 197, 202, 0.2);
  cursor: pointer;
  transition: var(--transition);
}

.frete-header:hover {
  background: linear-gradient(135deg, rgba(106, 197, 202, 0.15), rgba(106, 197, 202, 0.08));
}

.frete-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text-color);
  font-size: 16px;
}

.frete-header-info i {
  color: var(--primary-color);
  font-size: 18px;
}

.frete-content {
  padding: 20px 25px;
  display: block;
}

/* Input do CEP */
.cep-input-group {
  margin-bottom: 20px;
}

.cep-input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-color);
  font-size: 14px;
}

.cep-input-container {
  position: relative;
  margin-bottom: 15px;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-size: 16px;
  z-index: 1;
}

#cep-input {
  width: 100%;
  padding: 12px 12px 12px 40px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 14px;
  font-family: var(--body-font);
  transition: var(--transition);
  box-sizing: border-box;
}

#cep-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(106, 197, 202, 0.1);
}

#cep-input::placeholder {
  color: var(--light-text);
  font-style: italic;
}

.btn-calcular-frete {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 15px;
}

.btn-calcular-frete:hover {
  background: linear-gradient(135deg, var(--primary-dark), #3a8a8f);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(106, 197, 202, 0.3);
}

.btn-calcular-frete:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.cep-help-link {
  color: var(--primary-color);
  font-size: 12px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.cep-help-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Opções de Frete */
.opcoes-frete {
  margin-top: 20px;
}

.opcao-frete {
  display: flex;
  align-items: center;
  padding: 15px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-bottom: 10px;
  cursor: pointer;
  transition: var(--transition);
  background: white;
}

.opcao-frete:hover {
  border-color: var(--primary-color);
  background: rgba(106, 197, 202, 0.02);
}

.opcao-frete.selected {
  border-color: var(--primary-color);
  background: rgba(106, 197, 202, 0.05);
  box-shadow: 0 2px 8px rgba(106, 197, 202, 0.2);
}

.opcao-frete input[type="radio"] {
  margin-right: 12px;
  accent-color: var(--primary-color);
}

.frete-info {
  flex: 1;
}

.frete-nome {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 3px;
  font-size: 14px;
}

.frete-prazo {
  font-size: 12px;
  color: var(--light-text);
  margin-bottom: 2px;
}

.frete-preco {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 15px;
}

.frete-gratis {
  color: var(--success-color);
  font-weight: 700;
}

/* Loading do Frete */
.frete-loading {
  text-align: center;
  padding: 20px;
  color: var(--light-text);
}

.frete-loading i {
  font-size: 24px;
  margin-bottom: 10px;
  animation: spin 1s linear infinite;
  color: var(--primary-color);
}

.frete-erro {
  text-align: center;
  padding: 15px;
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: var(--border-radius);
  color: var(--error-color);
  font-size: 13px;
  margin-top: 15px;
}

/* Total Atualizado */
.total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  margin-top: auto;
}

.total span:last-child {
  font-size: 20px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/*--------------------------------------------------------------
# Bloco 19 - RESPONSIVIDADE DA SEÇÃO DE FRETE
--------------------------------------------------------------*/
@media (max-width: 768px) {
  .frete-section {
    margin: 0;
  }
  
  .frete-header {
    padding: 12px 15px;
  }
  
  .frete-header-info {
    font-size: 14px;
  }
  
  .frete-content {
    padding: 15px;
  }
  
  #cep-input {
    padding: 10px 10px 10px 35px;
    font-size: 13px;
  }
  
  .btn-calcular-frete {
    padding: 10px 15px;
    font-size: 13px;
  }
  
  .opcao-frete {
    padding: 12px;
  }
  
  .frete-nome {
    font-size: 13px;
  }
  
  .frete-prazo {
    font-size: 11px;
  }
  
  .frete-preco {
    font-size: 14px;
  }
  
  .total {
    padding: 15px;
    font-size: 16px;
  }
  
  .total span:last-child {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .frete-header {
    padding: 10px 12px;
  }
  
  .frete-content {
    padding: 12px;
  }
  
  .opcao-frete {
    padding: 10px;
  }
  
  .frete-nome {
    font-size: 12px;
  }
  
  .frete-prazo {
    font-size: 10px;
  }
  
  .frete-preco {
    font-size: 13px;
  }
}

/*--------------------------------------------------------------
# Bloco 20 - ESTADOS E ANIMAÇÕES EXTRAS
--------------------------------------------------------------*/

/* Sidebar entrando */
@keyframes slideInRight {
  from {
    right: -100%;
    opacity: 0;
  }
  to {
    right: 0;
    opacity: 1;
  }
}

/* Sidebar saindo */
@keyframes slideOutRight {
  from {
    right: 0;
    opacity: 1;
  }
  to {
    right: -100%;
    opacity: 0;
  }
}

/* Sidebar mobile entrando */
@keyframes slideInLeft {
  from {
    left: 100vw;
    opacity: 0;
  }
  to {
    left: 0;
    opacity: 1;
  }
}

/* Sidebar mobile saindo */
@keyframes slideOutLeft {
  from {
    left: 0;
    opacity: 1;
  }
  to {
    left: 100vw;
    opacity: 0;
  }
}

/* Estados especiais */
.sidebar.entering {
  animation: slideInRight 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sidebar.leaving {
  animation: slideOutRight 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (max-width: 768px) {
  .sidebar.entering {
    animation: slideInLeft 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  
  .sidebar.leaving {
    animation: slideOutLeft 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
}

/* Shake para erros */
@keyframes shake-error {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
  20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.sidebar.error {
  animation: shake-error 0.6s ease-in-out;
}

/* Pulse para loading */
@keyframes pulse-loading {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.sidebar.loading {
  animation: pulse-loading 1.5s ease-in-out infinite;
}

/*--------------------------------------------------------------
# Bloco 21 - CLASSES UTILITÁRIAS E HELPERS
--------------------------------------------------------------*/

/* Ocultar elementos */
.hidden {
  display: none !important;
}

.invisible {
  visibility: hidden !important;
}

/* Mostrar elementos */
.show {
  display: block !important;
}

.visible {
  visibility: visible !important;
}

/* Estados de loading */
.is-loading {
  pointer-events: none;
  opacity: 0.6;
}

/* Estados desabilitados */
.disabled {
  pointer-events: none !important;
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

/* Scrollbar personalizada para toda a sidebar */
.sidebar * {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) transparent;
}

.sidebar *::-webkit-scrollbar {
  width: 6px;
}

.sidebar *::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar *::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.sidebar *::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/*--------------------------------------------------------------
# FIM DO ARQUIVO SIDEBAR.CSS
--------------------------------------------------------------*/