/* Camada de efeitos do site institucional Ferpeças (equivalente ao
   site-modern.css do Sabtech_site): scrollbar customizada, header sticky
   com blur, hovers animados, hero decorativo, menu mobile, GSAP reveal. */

:root {
  --fp-shadow: 0 22px 60px rgba(26, 23, 24, 0.14);
  --fp-shadow-soft: 0 12px 30px rgba(26, 23, 24, 0.08);
}

* {
  scrollbar-color: rgba(245, 130, 31, 0.65) rgba(26, 23, 24, 0.08);
}

html {
  scroll-behavior: smooth;
}

::selection {
  color: #fff;
  background: rgba(245, 130, 31, 0.75);
}

a, button, input, textarea, select {
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease,
    box-shadow 180ms ease, transform 180ms ease;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(245, 130, 31, 0.4);
  outline-offset: 3px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--fp-orange), var(--fp-amber));
  box-shadow: 0 0 16px rgba(245, 130, 31, 0.55);
  pointer-events: none;
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  box-shadow: 0 1px 0 rgba(26, 23, 24, 0.08);
}

.site-header .header-row {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  transition: box-shadow 220ms ease, padding 220ms ease;
}

.site-header.is-scrolled .header-row {
  box-shadow: var(--fp-shadow-soft);
  padding-block: 12px;
}

.brand img { transition: transform 180ms ease; }
.brand:hover img { transform: scale(1.03); }

.search-bar { transition: border-color 180ms ease, box-shadow 180ms ease; }
.search-bar:focus-within { border-color: var(--fp-orange); box-shadow: 0 0 0 4px rgba(245, 130, 31, 0.12); }
.search-bar button:hover { background: var(--fp-orange-dark); }

.header-action:hover .title-small { color: var(--fp-orange); }

.nav a { position: relative; padding: 4px 0; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 999px;
  background: var(--fp-orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }

/* buttons */
.btn { position: relative; isolation: isolate; overflow: hidden; }
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.35), transparent 44%);
  transition: opacity 180ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:hover::before { opacity: 1; }
.btn-primary:hover { background: var(--fp-orange-dark); box-shadow: 0 14px 30px rgba(245, 130, 31, 0.32); }
.btn-outline:hover { background: var(--fp-charcoal); color: #fff; }
.btn-outline-w:hover { background: rgba(255,255,255,0.15); border-color: #fff; }
.btn-card:hover { background: var(--fp-charcoal); color: #fff; }

/* hero decorative grid + diagonal accent */
.hero { isolation: isolate; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 80px);
  mask-image: linear-gradient(90deg, rgba(0,0,0,0.7), rgba(0,0,0,0.9), rgba(0,0,0,0.3));
}
.hero-diamond { transition: transform 260ms ease; }

.hero-visual {
  position: absolute;
  top: 50%;
  right: max(40px, calc((100vw - 1280px) / 2 + 40px));
  z-index: 3;
  width: 300px;
  padding: 18px;
  color: #fff;
  border: 1px solid rgba(245, 130, 31, 0.3);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03)), var(--fp-charcoal-2);
  box-shadow: 0 26px 80px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.1);
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
  display: none;
}

@media (min-width: 1100px) {
  .hero-visual { display: block; }
}

.hero--compact .hero-visual { width: 260px; opacity: 0.85; }

.visual-top { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.visual-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fp-orange); }
.visual-dot.is-amber { background: var(--fp-amber); }
.visual-dot.is-green { background: var(--fp-green); }
.visual-title { margin-left: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: #C9C6C2; text-transform: uppercase; }
.visual-chip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
.visual-chip-grid span { padding: 8px; text-align: center; font-size: 11.5px; font-weight: 600; border-radius: 4px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); }
.visual-row { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: #C9C6C2; margin-bottom: 10px; }
.visual-row span { flex-shrink: 0; width: 76px; }
.visual-bar { position: relative; flex-grow: 1; height: 5px; border-radius: 999px; background: rgba(255,255,255,0.1); overflow: hidden; }
.visual-bar::after { content: ""; position: absolute; inset: 0; width: var(--bar-size, 60%); border-radius: 999px; background: linear-gradient(90deg, var(--fp-orange), var(--fp-amber)); animation: fpBar 1.1s ease-out both; }
.visual-metrics { display: flex; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.1); }
.visual-metric { display: flex; flex-direction: column; gap: 2px; }
.visual-metric strong { color: var(--fp-orange); font-size: 14px; font-family: 'Oswald', sans-serif; }
.visual-metric span { font-size: 10.5px; color: #9A9691; }

/* cards */
.card, .value-item {
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  box-shadow: var(--fp-shadow-soft);
}
.card::before, .value-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--fp-orange), var(--fp-amber));
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 220ms ease;
}
.card:hover, .value-item:hover {
  border-color: rgba(245, 130, 31, 0.35);
  box-shadow: var(--fp-shadow);
  transform: translateY(-4px);
}
.card:hover::before, .value-item:hover::before { transform: scaleX(1); }
.card-category .icon svg { transition: transform 220ms ease; }
.card:hover .card-category .icon svg { transform: scale(1.08); }

/* filters */
.filter-option { cursor: pointer; }
.filter-option:hover { color: var(--fp-charcoal); }
.qty-add .btn-add:hover { background: var(--fp-orange); }
.qty-stepper span:hover { color: var(--fp-orange); }

/* pagination */
.pagination a:hover { border-color: var(--fp-orange); color: var(--fp-orange); }

/* promo band diagonal accent */
.promo-band .hero-diamond { right: 0; top: 0; bottom: 0; width: 260px; clip-path: polygon(35% 0, 100% 0, 65% 100%, 0 100%); }

/* footer */
.footer-col a { display: inline-block; }
.footer-bottom a:hover { color: var(--fp-orange); }

/* mobile nav */
.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: var(--fp-charcoal);
  border-radius: 3px;
  flex-shrink: 0;
}
.mobile-nav-toggle svg { width: 22px; height: 22px; }

.mobile-nav-backdrop, .mobile-nav-panel { display: none; }
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 68;
  background: rgba(26, 23, 24, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}
.mobile-nav-panel {
  position: fixed;
  top: 84px;
  right: 16px;
  left: 16px;
  z-index: 70;
  padding: 14px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(26,23,24,0.3);
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.mobile-nav-panel a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 4px;
  color: var(--fp-charcoal);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13.5px;
}
.mobile-nav-panel a + a { margin-top: 2px; }
.mobile-nav-panel a.active, .mobile-nav-panel a:hover { color: var(--fp-orange); background: rgba(245,130,31,0.08); }

body.mobile-nav-open .mobile-nav-backdrop,
body.mobile-nav-open .mobile-nav-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@keyframes fpBar {
  0% { width: calc(var(--bar-size, 60%) - 10%); opacity: 0.4; }
  100% { width: var(--bar-size, 60%); opacity: 1; }
}

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

/* formulários, dashboard, checkout, produto */
.side-link:not(.active):hover { background: var(--fp-bg); color: var(--fp-charcoal); }
.account-type:not(.active):hover { border-color: var(--fp-muted-2); }
.pay-option:not(.active):hover { border-color: var(--fp-muted-2); }
.auth-tab:hover { color: var(--fp-charcoal); }
.data-table tr:hover td { background: var(--fp-bg); }
.product-thumbs .thumb-sm:hover { border-color: var(--fp-orange); }
.tab-item:hover { color: var(--fp-charcoal); }
.cart-remove:hover { color: #D64545; }
.stat-card { transition: transform 220ms ease, box-shadow 220ms ease; box-shadow: var(--fp-shadow-soft); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--fp-shadow); border-color: rgba(245,130,31,0.3); }
.field-input { transition: border-color 180ms ease, box-shadow 180ms ease; }
.mini-header { box-shadow: 0 1px 0 rgba(26,23,24,0.06); }

@media (max-width: 900px) {
  .mobile-nav-toggle { display: flex; }
  .header-actions { gap: 14px; }
  .category-nav { display: none; }
}
