/* ================================
   Ghostface Navbar
   adaptado para preto/vermelho
================================ */

:root {
  --ghostface-active-navbar-height: 62px;
}

.collection-ghostface {
  --navbar-height: 62px;
}

/* ================================
   Base / Desktop
================================ */

.collection-ghostface .navbar-ghostface {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;

  width: 100%;
  height: var(--ghostface-active-navbar-height);
  min-height: var(--ghostface-active-navbar-height);
  padding: 0 clamp(18px, 5vw, 86px);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);

  background: #000;

  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition:
    height 0.28s ease,
    min-height 0.28s ease,
    padding 0.28s ease,
    background 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.collection-ghostface .navbar-ghostface::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;

  height: 1px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0.42),
    rgba(255, 255, 255, 0.18),
    transparent
  );

  opacity: 0.75;
  pointer-events: none;
}

.collection-ghostface .navbar-ghostface.is-scrolled {
  background: #000;

  border-bottom-color: rgba(255, 255, 255, 0.28);

  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.82),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ================================
   Logo da Navbar Ghostface
================================ */

.collection-ghostface .ghostface-navbar-logo {
  position: relative;
  z-index: 1;

  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  overflow: hidden;

  opacity: 1;
  pointer-events: auto;

  transition:
    opacity 0.26s ease,
    width 0.26s ease,
    max-width 0.26s ease,
    transform 0.26s ease,
    margin 0.26s ease;
}

.collection-ghostface .ghostface-navbar-logo img {
  width: auto;
  height: calc(var(--ghostface-active-navbar-height) - 16px);
  max-width: 145px;
  max-height: calc(var(--ghostface-active-navbar-height) - 16px);

  display: block;
  object-fit: contain;

  filter:
    drop-shadow(0 0 10px rgba(255, 255, 255, 0.08))
    drop-shadow(0 0 18px rgba(169, 0, 0, 0.18));
}

/* ================================
   Lista de links
================================ */

.collection-ghostface .navbar-ghostface .nav-links {
  position: relative;
  z-index: 1;

  margin: 0;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;

  list-style: none;
}

.collection-ghostface .navbar-ghostface .nav-links li {
  margin: 0;
  padding: 0;
}

.collection-ghostface .navbar-ghostface .nav-links a {
  position: relative;

  color: rgba(255, 255, 255, 0.76);

  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;

  transition:
    color 0.25s ease,
    text-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.collection-ghostface .navbar-ghostface .nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;

  width: 0;
  height: 1px;

  background: var(--ghostface-red, #a90000);
  box-shadow: 0 0 12px rgba(169, 0, 0, 0.9);

  transition: width 0.25s ease;
}

.collection-ghostface .navbar-ghostface .nav-links a:hover {
  color: #fff;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.18),
    0 0 18px rgba(169, 0, 0, 0.76);
}

.collection-ghostface .navbar-ghostface .nav-links a:hover::after {
  width: 100%;
}

/* ================================
   Botão Carrinho
================================ */

.collection-ghostface .navbar-ghostface .cart-link {
  min-height: 38px;
  padding: 0 18px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #000;

  color: rgba(255, 255, 255, 0.84);

  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.025);

  font-size: 0.74rem;
  letter-spacing: 0.18em;
}

.collection-ghostface .navbar-ghostface .cart-link::after {
  display: none;
}

.collection-ghostface .navbar-ghostface .cart-link:hover {
  border-color: rgba(255, 255, 255, 0.58);
  background: #050505;

  color: #fff;

  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.08),
    inset 0 0 18px rgba(255, 255, 255, 0.04);
}

/* Estado padrão: carrinho vazio */
.collection-ghostface .navbar-ghostface .cart-link [data-cart-count] {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 21px;
  height: 21px;
  padding: 0 6px;

  border-radius: 999px;

  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(210, 210, 210, 0.52);
  color: rgba(0, 0, 0, 0.58);

  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;

  box-shadow:
    inset 0 0 8px rgba(255, 255, 255, 0.16),
    0 0 10px rgba(255, 255, 255, 0.03);

  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

/* Carrinho vazio */
.collection-ghostface .navbar-ghostface .cart-link.cart-is-empty [data-cart-count] {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(190, 190, 190, 0.46);
  color: rgba(0, 0, 0, 0.5);
}

/* Carrinho com produto */
.collection-ghostface .navbar-ghostface .cart-link.cart-has-items {
  border-color: rgba(169, 0, 0, 0.9);

  background:
    linear-gradient(
      180deg,
      rgba(169, 0, 0, 0.24),
      rgba(0, 0, 0, 0.56)
    );

  box-shadow:
    0 0 22px rgba(169, 0, 0, 0.22),
    inset 0 0 20px rgba(255, 255, 255, 0.035);
}

.collection-ghostface .navbar-ghostface .cart-link.cart-has-items [data-cart-count] {
  border-color: rgba(255, 255, 255, 0.12);
  background: var(--ghostface-red, #a90000);
  color: #fff;

  box-shadow:
    0 0 14px rgba(255, 0, 0, 0.62),
    inset 0 0 8px rgba(255, 255, 255, 0.12);

  transform: scale(1.02);
}

/* Pequeno efeito quando o carrinho muda */
.collection-ghostface .navbar-ghostface .cart-link.cart-count-pulse [data-cart-count] {
  animation: ghostfaceCartPulse 0.42s ease;
}

@keyframes ghostfaceCartPulse {
  0% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.22);
  }

  100% {
    transform: scale(1.02);
  }
}

/* ================================
   Mobile / Tablet
================================ */

@media (max-width: 850px) {
  :root {
    --ghostface-active-navbar-height: 60px;
  }

  .collection-ghostface {
    --navbar-height: 60px;
  }

  html {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-padding-top: calc(var(--ghostface-active-navbar-height) + 16px);
  }

  body.collection-ghostface {
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .collection-ghostface .ghostface-navbar-logo img {
    max-width: 118px;
    height: calc(var(--ghostface-active-navbar-height) - 18px);
  }
  .collection-ghostface .navbar-ghostface {
    height: var(--ghostface-active-navbar-height);
    min-height: var(--ghostface-active-navbar-height);
    padding: 0 16px;
  }

  .collection-ghostface .navbar-ghostface .nav-links {
    width: auto;
    justify-content: flex-end;
    gap: 14px;
  }

  .collection-ghostface .navbar-ghostface .nav-links a {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
  }

  .collection-ghostface .navbar-ghostface .cart-link {
    min-height: 38px;
    padding: 0 16px;
  }
}

@media (max-width: 420px) {
  .collection-ghostface .navbar-ghostface {
    padding: 0 12px;
  }

  .collection-ghostface .navbar-ghostface .nav-links a {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
  }

  .collection-ghostface .navbar-ghostface .cart-link {
    padding: 0 14px;
  }
}

@media (max-width: 360px) {
  .collection-ghostface .navbar-ghostface .nav-links a {
    font-size: 0.64rem;
    letter-spacing: 0.12em;
  }

  .collection-ghostface .navbar-ghostface .cart-link {
    padding: 0 12px;
  }

  .collection-ghostface .navbar-ghostface .cart-link [data-cart-count] {
    min-width: 20px;
    height: 20px;
    font-size: 0.64rem;
  }
}

/* ================================
   Acessibilidade
================================ */

@media (prefers-reduced-motion: reduce) {
  .collection-ghostface .navbar-ghostface,
  .collection-ghostface .navbar-ghostface .nav-links a,
  .collection-ghostface .navbar-ghostface .cart-link,
  .collection-ghostface .navbar-ghostface .cart-link [data-cart-count] {
    transition: none;
  }

  .collection-ghostface .navbar-ghostface .cart-link.cart-count-pulse [data-cart-count] {
    animation: none;
  }
}

/* ================================
   Estado com scroll
   Some logo + Home
================================ */

.collection-ghostface .navbar-ghostface.is-scrolled {
  justify-content: flex-end;
}

.collection-ghostface .navbar-ghostface.is-scrolled .ghostface-navbar-logo {
  width: 0;
  max-width: 0;
  margin: 0;

  opacity: 0;
  pointer-events: none;

  transform: translateY(-8px) scale(0.92);
}

.collection-ghostface .navbar-ghostface.is-scrolled .ghostface-home-item {
  display: none;
}

/* ================================
   Mobile - Navbar em duas linhas
   Logo centralizada + ações abaixo
================================ */

@media (max-width: 600px) {
  :root {
    --ghostface-active-navbar-height: 104px;
  }

  .collection-ghostface {
    --navbar-height: 104px;
  }

  .collection-ghostface .navbar-ghostface {
    height: var(--ghostface-active-navbar-height);
    min-height: var(--ghostface-active-navbar-height);

    padding: 8px 10px 10px;

    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .collection-ghostface .ghostface-navbar-logo {
    width: 100%;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .collection-ghostface .ghostface-navbar-logo img {
    height: 30px;
    max-height: 30px;
    max-width: 118px;
  }

  .collection-ghostface .navbar-ghostface .nav-links {
    width: 100%;

    display: grid;
    grid-template-columns: minmax(0, 1.35fr) auto auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .collection-ghostface .navbar-ghostface .nav-links li {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Home com o mesmo estilo dos botões */
  .collection-ghostface .navbar-ghostface .ghostface-home-link {
    min-height: 38px;
    padding: 0 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, 0.22);
    background: #000;

    color: rgba(255, 255, 255, 0.84);

    box-shadow:
      inset 0 0 18px rgba(255, 255, 255, 0.025);

    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
  }

  .collection-ghostface .navbar-ghostface .ghostface-home-link::after {
    display: none;
  }

  .collection-ghostface .navbar-ghostface .ghostface-home-link:hover {
    border-color: rgba(255, 255, 255, 0.58);
    background: #050505;

    color: #fff;

    box-shadow:
      0 0 18px rgba(255, 255, 255, 0.08),
      inset 0 0 18px rgba(255, 255, 255, 0.04);
  }

  /* Carrinho preparado para texto + ícone */
  .collection-ghostface .navbar-ghostface .ghostface-cart-link {
    min-width: 0;
    min-height: 38px;
    padding: 0 12px;

    gap: 8px;
  }

  .collection-ghostface .ghostface-cart-text {
    display: inline-block;
  }

  .collection-ghostface .ghostface-cart-icon {
    width: 17px;
    height: 17px;

    display: none;

    fill: currentColor;
    flex: 0 0 auto;
  }

  /* Estado mobile com scroll */
  .collection-ghostface .navbar-ghostface.is-scrolled {
    height: 60px;
    min-height: 60px;

    padding: 0 10px;

    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  .collection-ghostface .navbar-ghostface.is-scrolled .ghostface-navbar-logo {
    display: none;
  }

  .collection-ghostface .navbar-ghostface.is-scrolled .nav-links {
    width: 100%;

    grid-template-columns: minmax(0, 1fr) auto auto;
    justify-content: center;
  }

  /* Importante: no mobile, Home NÃO some no scroll */
  .collection-ghostface .navbar-ghostface.is-scrolled .ghostface-home-item {
    display: flex;
  }

  .collection-ghostface .navbar-ghostface.is-scrolled .ghostface-cart-icon {
    display: block;
  }

  .collection-ghostface .navbar-ghostface.is-scrolled .ghostface-cart-link {
    min-width: 48px;
    padding: 0 10px;
  }
}

/* ================================
   Ghostface Navbar - Correção final
   Home com estilo global + mobile scroll
================================ */

/* Home com o mesmo estilo do carrinho em TODAS as resoluções */
.collection-ghostface .navbar-ghostface .ghostface-home-link {
  min-height: 38px;
  padding: 0 18px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #000;

  color: rgba(255, 255, 255, 0.84);

  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.025);

  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;

  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
}

.collection-ghostface .navbar-ghostface .ghostface-home-link::after {
  display: none;
}

.collection-ghostface .navbar-ghostface .ghostface-home-link:hover {
  border-color: rgba(255, 255, 255, 0.58);
  background: #050505;

  color: #fff;

  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.08),
    inset 0 0 18px rgba(255, 255, 255, 0.04);
}

/* Carrinho mantém o mesmo padrão visual */
.collection-ghostface .navbar-ghostface .ghostface-cart-link {
  min-height: 38px;
}

/* Ícone do carrinho começa escondido */
.collection-ghostface .ghostface-cart-icon {
  width: 17px;
  height: 17px;

  display: none;

  fill: currentColor;
  flex: 0 0 auto;
}

/* ================================
   Mobile normal
   Logo centralizada + botões próximos
================================ */

@media (max-width: 600px) {
  :root {
    --ghostface-active-navbar-height: 96px;
  }

  .collection-ghostface {
    --navbar-height: 96px;
  }

  .collection-ghostface .navbar-ghostface {
    height: var(--ghostface-active-navbar-height);
    min-height: var(--ghostface-active-navbar-height);

    padding: 8px 12px 9px;

    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }

  .collection-ghostface .ghostface-navbar-logo {
    width: 100%;
    height: 30px;
    margin: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    transform: none;
  }

  .collection-ghostface .ghostface-navbar-logo img {
    height: 26px;
    max-height: 26px;
    max-width: 118px;

    display: block;
  }

  .collection-ghostface .navbar-ghostface .nav-links {
    width: 100%;

    display: grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    justify-content: center;
    gap: 7px;

    margin: 0;
    padding: 0;
  }

  .collection-ghostface .navbar-ghostface .nav-links li {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .collection-ghostface .navbar-ghostface .ghostface-home-link,
  .collection-ghostface .navbar-ghostface .ghostface-cart-link {
    min-height: 38px;
    padding: 0 10px;

    font-size: 0.56rem;
    letter-spacing: 0.08em;
  }

  .collection-ghostface .navbar-ghostface .ghostface-cart-link {
    gap: 7px;
  }

  .collection-ghostface .ghostface-cart-text {
    display: inline-block;
  }

  .collection-ghostface .ghostface-cart-icon {
    display: none;
  }
}

/* ================================
   Mobile com scroll
   Some logo + some Home + carrinho ícone
================================ */

@media (max-width: 600px) {
  .collection-ghostface .navbar-ghostface.is-scrolled {
    height: 60px;
    min-height: 60px;

    padding: 0 12px;

    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
  }

  .collection-ghostface .navbar-ghostface.is-scrolled .ghostface-navbar-logo {
    display: none !important;
  }

  .collection-ghostface .navbar-ghostface.is-scrolled .nav-links {
    width: auto;

    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  /* No scroll, Home NÃO aparece */
  .collection-ghostface .navbar-ghostface.is-scrolled .ghostface-home-item {
    display: none !important;
  }

  /* No scroll, Carrinho vira só ícone + contador */
  .collection-ghostface .navbar-ghostface.is-scrolled .ghostface-cart-text {
    display: none !important;
  }

  .collection-ghostface .navbar-ghostface.is-scrolled .ghostface-cart-icon {
    display: block !important;
  }

  .collection-ghostface .navbar-ghostface.is-scrolled .ghostface-cart-link {
    min-width: 48px;
    min-height: 38px;
    padding: 0 10px;
    gap: 7px;
  }
}

/* Ajuste extra para telas bem estreitas */
@media (max-width: 380px) {
  .collection-ghostface .navbar-ghostface {
    padding-inline: 9px;
  }

  .collection-ghostface .navbar-ghostface .nav-links {
    gap: 5px;
  }

  .collection-ghostface .navbar-ghostface .ghostface-home-link,
  .collection-ghostface .navbar-ghostface .ghostface-cart-link {
    padding: 0 8px;

    font-size: 0.52rem;
    letter-spacing: 0.06em;
  }

  .collection-ghostface .navbar-ghostface.is-scrolled .nav-links {
    gap: 7px;
  }
}
