/* Componentes específicos da página principal */

/* ===== FLOATING LABELS ===== */
.floating-input-group {
  position: relative;
  margin-bottom: 16px;
}

.floating-input {
  width: 100%;
  height: 58px;
  padding: 20px 16px 8px 16px;
  border: 2px solid var(--gray-300);
  border-radius: 10px;
  font-size: var(--font-base);
  color: var(--dark);
  background: #fff;
  transition: var(--transition);
  outline: none;
  font-family: inherit;
}

.floating-label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-600);
  font-size: var(--font-base);
  font-weight: 400;
  transition: var(--transition);
  pointer-events: none;
  background: white;
  padding: 0 4px;
  z-index: 1;
}

/* Label ativo - sobe */
.floating-input:focus + .floating-label,
.floating-input:not(:placeholder-shown) + .floating-label,
.floating-input.has-value + .floating-label {
  top: 0;
  transform: translateY(-50%);
  font-size: var(--font-sm);
  color: var(--primary);
  font-weight: 500;
}

/* Focus state */
.floating-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(125, 60, 68, 0.18);
}

/* Error state */
.floating-input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

.floating-input.error + .floating-label {
  color: var(--danger);
}

/* Valid state */
.floating-input.valid {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.1);
  padding-right: 48px;
}

.floating-input.valid + .floating-label {
  color: var(--success);
}

/* Validation icon */
.validation-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: var(--success);
  font-weight: bold;
  font-size: var(--font-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-input.valid ~ .validation-icon {
  opacity: 1;
}

/* Error message */
.error-message {
  position: absolute;
  left: 0;
  bottom: -22px;
  color: var(--danger);
  font-size: var(--font-sm);
  font-weight: 500;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s ease;
}

.floating-input.error ~ .error-message {
  opacity: 1;
  transform: translateY(0);
}

/* ===== MODAL MELHORIAS ===== */
/* Scrollbar customization para modal body (evita conflito com style2.css) */
.payment-modal-body::-webkit-scrollbar {
  width: 8px;
}

.payment-modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.payment-modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 10px;
}

.payment-modal-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #43151b 100%);
}

/* ===== GLASSMORPHISM BOTTOM SECTION ===== */
/* Seção inferior fixa com glassmorphism */
.glass-bottom-section {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(239, 129, 86, 0.2);
  border-radius: 0 0 20px 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.total-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.total-text {
  font-size: var(--font-base);
  color: #666;
  font-weight: 500;
}

.total-amount {
  font-size: var(--font-lg);
  font-weight: 900;
  color: #2c3e50;
  letter-spacing: -0.025em;
}

/* ===== WHATSAPP CHECKOUT BUTTON ===== */
.whatsapp-checkout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #25d366 0%, #1ebe5a 100%);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 16px;
  font-size: var(--font-base);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.whatsapp-checkout-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.whatsapp-checkout-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.2);
}

.whatsapp-icon {
  width: 26px;
  height: 26px;
  filter: brightness(0) invert(1);
}

/* ===== UTILITY CLASSES ===== */

/* Classes para substituir estilos inline */
.cart-icon {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
}

.order-items-spacing {
  padding: 14px 0;
}

.hidden-textarea {
  display: none;
}

.payment-section-spacing {
  padding: 0 0 14px 0;
}

.fee-info-hidden {
  display: none;
  margin-top: 8px;
  color: #495057;
  font-size: var(--font-sm);
}

.troco-container-hidden {
  display: none;
}

.pix-container-hidden {
  display: none;
  margin-top: 10px;
}

.pix-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pix-copy-btn {
  flex: 0 0 auto;
}

.pix-copy-message {
  display: none;
  margin-top: 6px;
  color: #00b572;
  font-size: var(--font-sm);
}

.pix-info-text {
  margin-top: 6px;
  color: #6c757d;
  font-size: var(--font-sm);
}

.payment-title-spacing {
  margin-top: 14px;
}

.modal-quantity-selector {
  flex-direction: row;
  gap: 8px;
  margin: 10px 0 16px;
  justify-content: center;
}

/* =====================================================
   SISTEMA DE SINALIZAÇÃO DE ITENS NO CARRINHO
   ===================================================== */

/* Borda VERDE + Background quando item está no carrinho */
.product-card.has-cart-items,
.suco-card-simple.has-cart-items {
  border: 1px solid var(--cart-selected);
  box-shadow: 0 4px 16px var(--cart-selected-shadow);
  background: var(--cart-selected-light);
}

/* Transição suave para o efeito */
.product-card, .suco-card-simple {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.promo-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 16px;
  margin: 8px 0;
  display: none;
}

.promo-desc {
  margin-bottom: 10px;
}

.promo-price-wrap {
  margin: 6px 0;
  font-weight: 600;
  display: none;
}

.promo-price-input-wrap {
  margin: 6px 0;
  display: none;
}

.promo-info-text {
  color: #6c757d;
  font-size: var(--font-sm);
  margin-top: 4px;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Ajustes para mobile */
@media (max-width: 768px) {
  .payment-modal-footer {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    padding: 12px 16px;
  }
  
  .total-info {
    text-align: center;
  }
  
  .whatsapp-checkout-btn {
    width: 100%;
    justify-content: center;
    font-size: var(--font-base);
  }
  
  .total-text {
    font-size: var(--font-base);
  }
  
  .total-amount {
    font-size: var(--font-base);
  }

  /* Mobile adjustments para floating inputs */
  .floating-input {
    height: 56px;
    padding: 18px 16px 8px 16px;
    font-size: var(--font-base); /* Evita zoom no iOS */
  }
  
  .floating-input-group {
    margin-bottom: 14px;
  }
}
