/* Plumbix note: shared visual styling for plumbix fico. */
/**
 * Plumbix "fico" — micro-animazioni, sezioni home, badge sistema, widget chat
 */

/* —— Fade-in on scroll (subtle) —— */
@media (prefers-reduced-motion: no-preference) {
  .px-fade-in {
    opacity: 0;
    transform: translateY(14px);
    animation: pxFadeIn 0.55s var(--ease-out, cubic-bezier(0.33, 1, 0.68, 1)) forwards;
  }
  .px-fade-in-delay-1 { animation-delay: 0.08s; }
  .px-fade-in-delay-2 { animation-delay: 0.16s; }
  .px-fade-in-delay-3 { animation-delay: 0.24s; }
  @keyframes pxFadeIn {
    to { opacity: 1; transform: translateY(0); }
  }
  .product-card,
  .product-item,
  .specs-card,
  .offers-grid > *,
  .home-news-grid > * {
    animation: pxCardIn 0.45s var(--ease-out, cubic-bezier(0.33, 1, 0.68, 1)) backwards;
  }
  .product-grid .product-item:nth-child(1),
  .product-grid .product-card:nth-child(1) { animation-delay: 0.05s; }
  .product-grid .product-item:nth-child(2),
  .product-grid .product-card:nth-child(2) { animation-delay: 0.1s; }
  .product-grid .product-item:nth-child(3),
  .product-grid .product-card:nth-child(3) { animation-delay: 0.15s; }
  .product-grid .product-item:nth-child(4),
  .product-grid .product-card:nth-child(4) { animation-delay: 0.2s; }
  @keyframes pxCardIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .px-fade-in { opacity: 1; transform: none; animation: none; }
}

/* —— Hero: watermark tubi + motto brand —— */
.hero-pipes-watermark {
  position: relative;
  overflow: hidden;
}
.hero-pipes-watermark::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%2322d3ee' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M8 60h28v16H8z'/%3E%3Cpath d='M36 68h20v-16h20v32H56'/%3E%3Cpath d='M76 52h28v16H76z'/%3E%3Cpath d='M20 28v20M52 92v-20M88 28v20'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 140px 140px;
  background-repeat: repeat;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 85%);
}
.hero-brand-motto {
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(224, 242, 254, 0.88);
  line-height: 1.5;
}
.catalog-brand-motto {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pro-cyan, #0891b2);
}

/* Benedizione del tubo — gocce CSS ~2s */
.px-pipe-blessing-droplets {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1200;
  overflow: hidden;
}
.px-pipe-drop {
  position: absolute;
  top: -12%;
  width: 8px;
  height: 14px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: linear-gradient(180deg, #22d3ee 0%, #0891b2 100%);
  opacity: 0.85;
  animation: pxPipeDropFall linear forwards;
}
@keyframes pxPipeDropFall {
  0% { transform: translateY(0) scale(1); opacity: 0.9; }
  85% { opacity: 0.7; }
  100% { transform: translateY(110vh) scale(0.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .px-pipe-drop { animation: none; opacity: 0; }
  .hero-pipes-watermark::before { opacity: 0.04; }
}

/* —— Hero punchy —— */
.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.hero-highlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: #e0f2fe;
}
.hero-highlight-pill i { color: var(--pro-cyan, #22d3ee); }
.hero-actions .btn-hero-quote {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4);
}
.hero-actions .btn-hero-quote:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(234, 88, 12, 0.5);
}

/* —— Sistemi in 60 secondi —— */
.systems-60-section {
  padding: 40px 0 8px;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.03) 0%, transparent 100%);
}
.systems-60-section h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.systems-60-section .systems-60-lead {
  color: var(--text-light, #5f7c99);
  font-size: 0.95rem;
  margin-bottom: 18px;
}
.systems-60-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.systems-60-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  background: #fff;
  border: 2px solid #e2e8f0;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--pro-navy, #0a1628);
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
  cursor: pointer;
}
.systems-60-chip:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(10, 22, 40, 0.1);
  border-color: var(--chip-color, #1a66d9);
}
.systems-60-chip.is-active {
  background: var(--chip-color, #1a66d9);
  border-color: var(--chip-color, #1a66d9);
  color: #fff;
}
.systems-60-chip.is-active i { color: #fff !important; }
.systems-60-chip i {
  font-size: 1.1rem;
  color: var(--chip-color, #1a66d9);
  transition: color 0.2s;
}

/* —— CTA preventivo guidato —— */
.preventivo-cta-band {
  padding: 36px 0;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border-top: 1px solid #fed7aa;
  border-bottom: 1px solid #fed7aa;
}
.preventivo-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.preventivo-cta-band h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  font-weight: 800;
  color: #9a3412;
  letter-spacing: -0.02em;
}
.preventivo-cta-band p {
  color: #c2410c;
  margin-top: 6px;
  max-width: 520px;
  font-size: 0.95rem;
}
.btn-preventivo-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ea580c, #c2410c);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(234, 88, 12, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-preventivo-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(234, 88, 12, 0.45);
  color: #fff;
}

/* —— Abbonamenti teaser —— */
.abbonamenti-teaser {
  padding: 32px 0;
  background: #0f172a;
  color: #cbd5e1;
}
.abbonamenti-teaser-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.abbonamenti-teaser h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}
.abbonamenti-teaser p { font-size: 0.9rem; margin-top: 6px; max-width: 560px; }
.abbonamenti-teaser .teaser-plans {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.abbonamenti-teaser .teaser-plan-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.15);
  color: #67e8f9;
}
.btn-abbonamenti-teaser {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: transparent;
  border: 2px solid var(--pro-cyan, #22d3ee);
  color: var(--pro-cyan, #22d3ee);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn-abbonamenti-teaser:hover {
  background: var(--pro-cyan, #22d3ee);
  color: #0f172a;
}

/* —— Perché Plumbix strip —— */
.specs-section .specs-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.specs-section .specs-card {
  border-radius: 16px;
  transition: transform 0.25s, border-color 0.25s;
}
.specs-section .specs-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.4);
}

/* —— Sistema badges su card prodotto —— */
.product-tag.sistema-badge {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.product-tag.sistema-multistrato { background: #ecfeff; color: #0e7490; }
.product-tag.sistema-pressfitting { background: #eff6ff; color: #1d4ed8; }
.product-tag.sistema-zincato { background: #f1f5f9; color: #475569; }
.product-tag.sistema-caldaia { background: #fffbeb; color: #b45309; }
.product-tag.sistema-scarico { background: #f5f3ff; color: #6d28d9; }
.product-tag.sistema-strumenti { background: #f0fdfa; color: #0f766e; }

/* —— Footer trust badges —— */
.footer-trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  padding: 16px 0 8px;
  border-top: 1px solid var(--gray-border, #e2e9f0);
  margin-top: 8px;
}
.footer-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light, #5f7c99);
}
.footer-trust-badge i { color: var(--primary, #1a66d9); }

/* —— Chat widget: collega digitale —— */
.plumbix-chat-widget-wrap {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  right: max(24px, env(safe-area-inset-right));
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
}
.plumbix-chat-widget-wrap .plumbix-chat-widget-fab {
  position: static;
  pointer-events: auto;
}
.plumbix-chat-fab-subtitle {
  display: none !important;
  pointer-events: none;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
  background: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  border: 1px solid #e2e8f0;
  white-space: nowrap;
  animation: pxFabSub 0.5s ease 0.8s backwards;
}
@keyframes pxFabSub {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* —— Macro riscaldamento giallo —— */
.category-brand--heating,
.macro-header--heating {
  --macro-heating: #eab308;
}
.category-brand[data-macro="heating"],
.category-header-branded[data-macro="heating"] {
  background: linear-gradient(135deg, #fde047 0%, #eab308 50%, #ca8a04 100%) !important;
}
.macro-card[data-macro="heating"] .macro-header {
  background: linear-gradient(135deg, #fde047 0%, #eab308 50%, #ca8a04 100%) !important;
  color: #422006;
}
.macro-card[data-macro="heating"] .macro-header .macro-title,
.macro-card[data-macro="heating"] .macro-actions button {
  color: #422006;
}
.macro-card[data-macro="heating"] .macro-actions button {
  background: rgba(66, 32, 6, 0.12);
}
