/* ==================== BUTTONS — hover shadow transition ==================== */
a[class*="bg-versax-600"]:hover,
button[class*="bg-versax-600"]:hover {
  --tw-shadow-color: rgba(249, 115, 22, 0.3);
}

/* ==================== GLOBAL ==================== */
::selection {
  background-color: #1845c0;
  color: white;
}

/* ==================== GRID PATTERN ==================== */
.grid-pattern {
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ==================== NAVBAR ==================== */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

#navbar.scrolled .nav-link {
  color: #535e78;
}

/* ==================== COUNTER ==================== */
.counter {
  font-variant-numeric: tabular-nums;
}

/* ==================== PRODUCT FILTER ==================== */
.product-filter {
  cursor: pointer;
  border: 1px solid transparent;
}

.product-filter.active {
  background: #f97316;
  color: white;
  border-color: #f97316;
}

.product-filter:not(.active):hover {
  border-color: #d5d9e2;
}

/* ==================== PRODUCT CARDS ==================== */
.product-card {
  transition: opacity 0.3s, transform 0.3s;
}

.product-card.hidden-by-filter {
  display: none;
}

/* ==================== WIZARD ==================== */
.wizard-option {
  cursor: pointer;
}

.wizard-option.selected {
  background: rgba(29, 85, 241, 0.15);
  border-color: rgba(89, 154, 255, 0.5);
}

.wizard-option.selected .text-white {
  color: #bcd7ff;
}

/* ==================== FAQ ACCORDION ==================== */
.faq-item.open .faq-trigger [data-lucide] {
  transform: rotate(180deg);
}

.faq-item.open {
  border-color: rgba(255,255,255,0.2);
  background: white;
  border-radius: 0.75rem;
}

.faq-item.open .faq-trigger span {
  color: #1845c0;
}

.faq-item.open .faq-trigger [data-lucide] {
  color: #1845c0;
}

.faq-item.open .faq-content p {
  color: #535e78;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-content {
  max-height: 600px; /* JS sets scrollHeight dynamically; this is the CSS fallback */
}

/* ==================== FORMS ==================== */
input:focus,
select:focus,
textarea:focus {
  border-color: #1845c0;
  box-shadow: 0 0 0 3px rgba(29, 85, 241, 0.1);
}

input[type="tel"],
input[type="number"] {
  font-variant-numeric: tabular-nums;
}

/* ==================== WHATSAPP — sobe quando LGPD visível ==================== */
body:has(#lgpd-banner:not(.hidden)) #whatsapp-float {
  bottom: 6rem;
}

/* ==================== WHATSAPP PULSE ==================== */
#whatsapp-float::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.4);
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  z-index: -1;
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ==================== CONVERSION TABLE ==================== */
#conv-table-body tr:nth-child(even) {
  background: rgba(0,0,0,0.02);
}

#conv-table-body td {
  padding: 6px 12px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 640px) {
  #hero h1 { font-size: 1.75rem; line-height: 1.15; }
  h2 { font-size: 1.375rem; }
  .counter { font-size: 1.5rem; }
  /* Minimum font size — prevent anything below 13px */
  body { font-size: 14px; overflow-x: hidden; }
  section { overflow-x: hidden; }
}

/* ==================== LARGE SCREENS (TV, 4K) ==================== */
@media (min-width: 1536px) {
  /* Scale base font for readability at distance */
  body { font-size: 16px; }

  /* Hero fills more of the screen */
  #hero h1 { max-width: 900px; }
}

@media (min-width: 2560px) {
  /* 4K / large TV */
  body { font-size: 18px; }
}

/* ==================== PRINT ==================== */
@media print {
  nav, #whatsapp-float, footer, .a11y-fab { display: none !important; }
  section { page-break-inside: avoid; }
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
