/* ============================================================
   Shopalli — global custom styles (loaded on every page)
   ============================================================ */

/* ── Footer — 4 colunas ───────────────────────────────────── */
.shopalli-footer-grid {
  display: grid !important;
  grid-template-columns: 1.8fr 1fr 1fr 1.4fr;
  gap: 48px !important;
  align-items: start;
}

.shopalli-footer-brand img {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

@media (max-width: 1199px) {
  .shopalli-footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
    flex-direction: unset !important;
  }
}

@media (max-width: 575px) {
  .shopalli-footer-grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
}

/* ── Mobile menu — need-help compact ─────────────────────── */
.canvas-mb .need-help-wrap {
  padding: 16px 5px !important;
  border-top: 1px solid var(--line);
  gap: 4px;
}

.canvas-mb .need-help-wrap .nd-title {
  font-size: 13px !important;
  font-weight: 600 !important;
  margin-bottom: 8px !important;
}

.canvas-mb .need-help-wrap p,
.canvas-mb .need-help-wrap a {
  font-size: 12px !important;
  line-height: 1.5 !important;
}

.canvas-mb .need-help-wrap .mb-16 { margin-bottom: 8px !important; }
.canvas-mb .need-help-wrap .mb-8  { margin-bottom: 4px !important; }
.canvas-mb .need-help-wrap .mb-4  { margin-bottom: 4px !important; }

/* ── Chat icon in header nav ──────────────────────────────── */
.nav-chat-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  transition: stroke 0.15s;
}

/* Active state on the chat page */
.nav-icon-active {
  color: var(--primary) !important;
}

.nav-icon-active .nav-chat-icon {
  stroke: var(--primary);
}

/* ── Slideshow — title sizes ──────────────────────────────── */
.tf-slideshow .title_sld {
  font-size: clamp(20px, 2.6vw, 34px) !important;
  line-height: 1.25 !important;
}

.tf-slideshow .sub-text_sld {
  font-size: clamp(13px, 1.4vw, 15px) !important;
  line-height: 1.6 !important;
}

/* ── Slideshow — text readability backdrop ────────────────── */
.tf-slideshow .sld_content .heading {
  background: rgba(5, 18, 10, 0.60);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-left: 4px solid rgba(74, 222, 128, 0.65);
  border-radius: 16px;
  padding: 28px 32px;
  width: fit-content;
  max-width: 580px;
}

.tf-slideshow .sld_content .title_sld {
  color: #fff !important;
}

.tf-slideshow .sld_content .sub-text_sld {
  color: rgba(255, 255, 255, 0.82) !important;
}

/* ── Homepage banner height ───────────────────────────────── */
.tf-slideshow .slideshow-wrap { height: 460px !important; }
@media (max-width: 1199px) { .tf-slideshow .slideshow-wrap { height: 400px !important; } }
@media (max-width: 767px)  { .tf-slideshow .slideshow-wrap { height: 420px !important; } }

/* ── Mega Menu — Comprar por categoria ───────────────────── */

/* Override: make the dropdown panel wide enough for two columns */
.nav-category-wrap .box-nav-category {
  right: auto !important;
  width: min(880px, calc(100vw - 40px));
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}

.mega-menu {
  display: flex;
  max-height: 440px;
}

/* Left column — parent list */
.mega-parents {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  width: 230px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.mega-parent__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 20px;
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  transition: color 0.15s, background 0.15s;
  cursor: pointer;
}

.mega-parent__link .icon {
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.45;
  transition: opacity 0.15s;
}

.mega-parent:hover .mega-parent__link,
.mega-parent.is-active .mega-parent__link {
  color: var(--primary);
  background: var(--bg);
}

.mega-parent.is-active .mega-parent__link .icon {
  opacity: 1;
}

/* Right column — subcategory panels */
.mega-panels {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  min-width: 0;
}

.mega-panel {
  height: 100%;
}

.mega-panel__title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.mega-panel__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 4px 16px;
}

.mega-sub__link {
  display: block;
  padding: 7px 4px;
  font-size: 13px;
  color: var(--text-3, #555);
  transition: color 0.15s;
  border-radius: 4px;
}

.mega-sub__link:hover {
  color: var(--primary);
}

/* Reset old nav-category li rules that would bleed into mega menu */
.box-nav-category .mega-parents li:not(:last-child),
.box-nav-category .mega-panel__list li:not(:last-child) {
  border-bottom: none;
}
.box-nav-category .mega-parents li:last-child .mega-parent__link,
.box-nav-category .mega-panel__list li:last-child a {
  border-radius: 0;
}

/* Empty right panel (no subs) */
.mega-panel--direct {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mega-panel--direct .mega-panel__go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
}

/* ── Slideshow mobile — gradient overlay, text at bottom ──── */
@media (max-width: 767px) {
  /* Gradiente escuro cobrindo 70% inferior da imagem */
  .tf-slideshow .slideshow-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to top,
      rgba(5, 18, 10, 0.92) 0%,
      rgba(5, 18, 10, 0.60) 45%,
      transparent 75%
    );
    z-index: 1;
    pointer-events: none;
  }

  /* Texto ancorado na base */
  .tf-slideshow .sld_content {
    top: unset !important;
    bottom: 0 !important;
    transform: none !important;
    padding-bottom: 32px;
    z-index: 2;
  }

  /* Remove glass box — gradiente já garante leitura */
  .tf-slideshow .sld_content .heading {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    padding: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    margin-bottom: 16px !important;
  }

  .tf-slideshow .title_sld {
    font-size: clamp(18px, 5.5vw, 26px) !important;
  }

  /* Subtítulo visível mesmo abaixo de 575px */
  .tf-slideshow .sld_content .sub-text_sld {
    display: block !important;
    font-size: 13px !important;
    margin-bottom: 20px;
  }

  /* Esconder botão Ver catálogo */
  .tf-slideshow .sld_content .fade-item-3 {
    display: none !important;
  }
}

/* ── Lotes de Giro Rápido (FIFO) — index + quem-somos ─────── */
.hp-fifo {
  position: relative;
  padding: 84px 0;
  background:
    radial-gradient(
      circle at 88% 12%,
      rgba(245, 91, 36, 0.07) 0%,
      rgba(245, 91, 36, 0) 46%
    ),
    #f8f7f4;
  overflow: hidden;
}
.hp-fifo::after {
  content: "";
  position: absolute;
  left: -200px;
  bottom: -240px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(16, 60, 41, 0.05) 0%,
    rgba(16, 60, 41, 0) 68%
  );
  pointer-events: none;
}

.hp-fifo__inner {
  position: relative;
  z-index: 1;
}

.hp-fifo__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: 64px;
  align-items: center;
}

/* ── coluna esquerda ─────────────────────────────────────── */
.hp-fifo__label {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: rgba(245, 91, 36, 0.11);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #f55b24;
  margin-bottom: 18px;
}
.hp-fifo__label .icon {
  font-size: 14px;
}

.hp-fifo__title {
  font-size: clamp(1.65rem, 3.2vw, 2.3rem) !important;
  font-weight: 800 !important;
  color: #0d0d0d !important;
  margin: 0 0 16px !important;
  line-height: 1.15 !important;
  letter-spacing: -0.025em !important;
}

.hp-fifo__lead {
  font-size: 1.06rem !important;
  font-weight: 500 !important;
  color: #2c2c2c !important;
  line-height: 1.6 !important;
  margin: 0 0 14px !important;
}

.hp-fifo__text {
  font-size: 0.95rem !important;
  color: #616161 !important;
  line-height: 1.72 !important;
  margin: 0 0 30px !important;
}

.hp-fifo__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hp-fifo__btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: all 0.22s ease;
}
.hp-fifo__btn--primary {
  background: #f55b24;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(245, 91, 36, 0.24);
}
.hp-fifo__btn--primary:hover {
  background: #dd4a15;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(245, 91, 36, 0.32);
}
.hp-fifo__btn--outline {
  background: #fff;
  border-color: #dcd9d4;
  color: #333 !important;
}
.hp-fifo__btn--outline:hover {
  border-color: #103c29;
  color: #103c29 !important;
}

/* ── painel direito ──────────────────────────────────────── */
.hp-fifo__panel {
  position: relative;
  background: #fff;
  border: 1px solid #e8e5e1;
  border-radius: 22px;
  padding: 10px 30px 14px;
  box-shadow: 0 18px 44px rgba(16, 60, 41, 0.07);
}

.hp-fifo__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 16px;
  border-bottom: 1px solid #eeebe7;
}

.hp-fifo__panel-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.hp-fifo__panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(16, 60, 41, 0.07);
  color: #103c29;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.hp-fifo__panel-badge .icon {
  font-size: 12px;
}

.hp-fifo__rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hp-fifo-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid #f1efec;
  transition: transform 0.22s ease;
}
.hp-fifo-row:last-child {
  border-bottom: 0;
}
.hp-fifo-row:hover {
  transform: translateX(4px);
}

.hp-fifo-row__icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  background: rgba(16, 60, 41, 0.07);
  color: #103c29;
}
.hp-fifo-row--sell .hp-fifo-row__icon {
  background: rgba(245, 91, 36, 0.11);
  color: #f55b24;
}
.hp-fifo-row--market .hp-fifo-row__icon {
  background: rgba(26, 92, 63, 0.1);
  color: #1a5c3f;
}

.hp-fifo-row__body {
  min-width: 0;
}

.hp-fifo-row__title {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #141414 !important;
  margin: 0 0 5px !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
}

.hp-fifo-row__desc {
  font-size: 0.9rem !important;
  color: #6b6b6b !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

/* ── responsivo ──────────────────────────────────────────── */
@media (max-width: 991px) {
  .hp-fifo__layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .hp-fifo {
    padding: 56px 0;
  }
  .hp-fifo__panel {
    padding: 6px 20px 10px;
    border-radius: 18px;
  }
  .hp-fifo-row {
    padding: 18px 0;
    gap: 13px;
  }
  .hp-fifo-row__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 18px;
  }
  .hp-fifo-row:hover {
    transform: none;
  }
  .hp-fifo__btns .hp-fifo__btn {
    flex: 1 1 100%;
  }
}
