/* BOTÃO FLOUTANTE */
.float-cart-btn {
  position: fixed;
  bottom: 350px; right: 10px;
  background: #ffffff; color: #000000;
  border-radius: 50px;
  padding: 0.75rem 1rem;
  display: flex; align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  cursor: pointer;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 1000;
}
.float-cart-btn.show {
  opacity: 1; visibility: visible;
}
.float-cart-btn img {
  width: 24px; height: 24px; margin-right: 0.5rem;
}

/* ===========================
   MODAL DE CARRINHO
   =========================== */
.cart-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}
.cart-modal.hidden {
  display: none;
}
.cart-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.cart-modal__panel {
  position: relative;
  background: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  max-height: 80%;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.cart-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Lista de itens do carrinho */
.cart-modal__list {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}
.cart-modal__list li {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}
.cart-modal__list img {
  width: 40px;
  height: 60px;
  object-fit: cover;
  margin-right: 0.75rem;
  border-radius: 4px;
}
.cart-modal__list button {
  background: #008060;
  border: none;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  margin: 0 0.25rem;
}

/* Botão de checkout/comprar */
.cart-modal__checkout {
  width: 100%;
  background: #185abc;
  color: #fff;
  padding: 0.75rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

/* ===========================
   BLOCO DE FRETE DENTRO DO MODAL
   =========================== */
/* Wrapper do CEP e botão */
.cart-modal__shipping {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;   /* empilha verticalmente */
  align-items: flex-start;  /* alinha tudo à esquerda */
  gap: 0.75rem;             /* espaço entre cep, botão e resultados */
}

/* Input de CEP e botão lado a lado */
.cart-modal__shipping > input,
.cart-modal__shipping > button {
  width: 100%;
}
.cart-modal__shipping > .shipping-row {
  display: flex;
  width: 100%;
  gap: 0.5rem;
}
.cart-modal__shipping input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.cart-modal__shipping button {
  padding: 0.5rem 1rem;
  background: #008060;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Área de resultados com scroll interno */
#shipping-result {
  width: 100%;
  margin-top: 0.5rem;
  
}
#shipping-result .shipping-options {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 250px;
  overflow-y: auto;
}

/* Cada opção de frete */
.shipping-option-label {
  
  align-items: center;   /* alinha rádio, ícone e texto */
  gap: 8px;               /* espaço interno entre elementos */
  margin-bottom: 12px;    /* espaço entre linhas */
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  word-wrap: break-word;  /* permite quebra de texto */
}

/* Ajustes no input */
.shipping-option-label input[type="radio"] {
  flex-shrink: 0;
}

/* Label clicável limpa */
.shipping-option-label label {
  cursor: pointer;
  line-height: 1.2;
  margin: 0;
}

/* Destaque na opção selecionada */
.shipping-option-label input[type="radio"]:checked + label {
  color: #006837;
  font-weight: 600;
}

/* Badge de contagem */
.cart-count {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #e17055;
  color: #fff;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}





 /* Container da animação */
.fly-box {
  position: absolute;
  width: 40px;
  height: 32px;
  pointer-events: none;
  z-index: 2000;
  transform-origin: center top;
  will-change: transform, opacity;
}

/* Corpo da caixa */
.fly-box .body {
  position: absolute;
  width: 40px;
  height: 24px;
  top: 8px;
  left: 0;
  background: linear-gradient(135deg, #f06, #c0392b);
  border-radius: 4px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.2), 0 4px 8px rgba(0,0,0,0.2);
  overflow: hidden;
}

/* Fitas cruzadas */
.fly-box .body::before,
.fly-box .body::after {
  content: "";
  position: absolute;
  background: #ec7063;
}
.fly-box .body::before {
  width: 6px;
  height: 100%;
  left: 17px;
  top: 0;
}
.fly-box .body::after {
  height: 6px;
  width: 100%;
  top: 9px;
  left: 0;
}

/* Tampa da caixa */
.fly-box .lid {
  transform-origin: top center;
  animation: lidOpenCreative 0.6s cubic-bezier(0.68,-0.55,0.27,1.55) forwards, lidCloseCreative 0.6s ease-out forwards 1.0s;
}
.fly-box .lid::before,
.fly-box .lid::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 8px;
  top: -6px;
  background: #ec7063;
  border-radius: 8px 8px 0 0;
  transform-origin: bottom center;
}
.fly-box .lid::before {
  left: 8px;
  transform: rotate(40deg) translateY(2px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.fly-box .lid::after {
  right: 8px;
  transform: rotate(-40deg) translateY(2px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.fly-box .lid span {
  position: absolute;
  top: -8px;
  left: 13px;
  width: 14px;
  height: 8px;
  background: #c0392b;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Opcional: brilhos que passam pela caixa */
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: translateX(-20px) rotate(0deg); }
  50% { opacity: 1; transform: translateX(60px) rotate(45deg); }
}
.fly-box .sparkle {
  position: absolute;
  top: 4px;
  left: 0;
  width: 4px;
  height: 4px;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  filter: blur(1px);
  animation: sparkle 1s ease-in-out infinite;
}

/* Tampa abre/fecha criativo */
@keyframes lidOpenCreative {
  0% { transform: rotateX(0deg); }
  50% { transform: rotateX(-140deg); }
  80% { transform: rotateX(-100deg); }
  100% { transform: rotateX(-120deg); }
}
@keyframes lidCloseCreative {
  0% { transform: rotateX(-120deg); }
  60% { transform: rotateX(30deg); }
  100% { transform: rotateX(0deg); }
}

/* Voo aprimorado */
@keyframes boxFlyEnhanced {
  0% {
    opacity: 1;
    transform: translate3d(0,0,0) scale3d(1,1,1) rotate(0deg);
  }
  60% {
    opacity: 1;
    transform: translate3d(var(--fly-x), var(--fly-y),0) scale3d(0.25,0.25,0.25) rotate(15deg);
  }
  80% {
    opacity: 1;
    transform: translate3d(var(--fly-x), var(--fly-y),0) scale3d(0.2,0.2,0.2) rotate(-10deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--fly-x), var(--fly-y),0) scale3d(0.15,0.15,0.15) rotate(0deg);
  }
}

/* Pulso no botão flutuante */
@keyframes pulseCart {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Brilho no carrinho */
@keyframes cartGlow {
  0% { box-shadow: 0 0 0 rgba(255,255,255,0); }
  100% { box-shadow: 0 0 12px rgba(255,255,255,0.8); }
}
.cart-glow {
  animation: cartGlow 0.5s ease-in-out forwards;
}

/* Estilo do modal de carrinho */
.cart-modal__panel {
  background: #fff;
  border-radius: 0.5rem;
  padding: 1.5rem;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* Itens do carrinho */
.cart-modal__list-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}
.cart-modal__item-info {
  flex: 1;
  margin: 0 1rem;
}
.cart-modal__item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Botões increment/decrement */
.cart-modal__item-actions button {
 
  border: 1px solid #ccc;
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  border-radius: 0.25rem;
  transition: background 0.2s, opacity 0.2s;
  cursor: pointer;
}
.cart-modal__item-actions button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f5f5f5;
  border-color: #ddd;
}

/* Animação de pulso na quantidade */
@keyframes pulseQty {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.qty-display.updated {
  animation: pulseQty 0.3s ease-out;
}

/* Toast de notificação */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.25rem;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 3000;
}
.toast.show {
  opacity: 0.9;
}
.toast.hidden {
  display: none;
}

/* Esconde apenas o campo de quantidade (± e input), mantém o Comprar Agora */
.details__quantity .quantity-container {
  display: none !important;
}




