/* ================================
   Ghostface Motion Toggle
================================ */

.collection-ghostface .ghostface-motion-toggle-item {
  display: flex;
  align-items: center;
}

.collection-ghostface .ghostface-motion-toggle {
  min-height: 38px;
  padding: 0 12px 0 14px;

  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.78);

  cursor: pointer;

  font-family: inherit;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;

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

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

.collection-ghostface .ghostface-motion-toggle: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);
}

.collection-ghostface .ghostface-motion-toggle[aria-pressed="true"] {
  border-color: rgba(169, 0, 0, 0.9);

  background:
    linear-gradient(
      180deg,
      rgba(169, 0, 0, 0.28),
      rgba(0, 0, 0, 0.68)
    );

  color: #fff;

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

/* Toggle switch horizontal */
.collection-ghostface .ghostface-motion-switch {
  position: relative;

  width: 40px;
  height: 20px;

  flex: 0 0 auto;

  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;

  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0.03)
    );

  box-shadow:
    inset 0 0 12px rgba(0, 0, 0, 0.75),
    0 0 10px rgba(255, 255, 255, 0.03);
}

.collection-ghostface .ghostface-motion-switch-thumb {
  position: absolute;
  left: 3px;
  top: 50%;

  width: 12px;
  height: 12px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.86);

  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.2),
    inset 0 0 4px rgba(0, 0, 0, 0.28);

  transform: translateY(-50%);

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

/* Quando as animações estão desativadas, o switch vai para a direita */
.collection-ghostface .ghostface-motion-toggle[aria-pressed="true"] .ghostface-motion-switch-thumb {
  left: 23px;

  background: var(--ghostface-red, #a90000);

  box-shadow:
    0 0 14px rgba(255, 0, 0, 0.72),
    inset 0 0 5px rgba(255, 255, 255, 0.14);
}

/* ================================
   Estado: animações desativadas
   O countdown continua funcionando
================================ */

.collection-ghostface.ghostface-no-animations #ghostfaceRainCanvas {
  opacity: 0;
  visibility: hidden;
}

/* Para movimento do personagem, glitch e bolinhas piscando */
.collection-ghostface.ghostface-no-animations .ghostface-character,
.collection-ghostface.ghostface-no-animations .ghostface-glitch,
.collection-ghostface.ghostface-no-animations .ghostface-ring,
.collection-ghostface.ghostface-no-animations .ghostface-screen-flash.flash,
.collection-ghostface.ghostface-no-animations .ghostface-buy-button.strike .ghostface-stab-knife,
.collection-ghostface.ghostface-no-animations .ghostface-drop {
  animation: none !important;
}

/* Mantém a bola vermelha fixa */
.collection-ghostface.ghostface-no-animations .ghostface-ring {
  opacity: 1 !important;
}

/* Remove a piscada na tela depois de adicionar ao carrinho */
.collection-ghostface.ghostface-no-animations .ghostface-screen-flash {
  display: none !important;
}

/* Remove faca e sangue no modo sem animações */
.collection-ghostface.ghostface-no-animations .ghostface-stab-knife,
.collection-ghostface.ghostface-no-animations .ghostface-blood-drops,
.collection-ghostface.ghostface-no-animations .ghostface-drop {
  display: none !important;
}

/* Remove carregamento progressivo do botão de compra */
.collection-ghostface.ghostface-no-animations .ghostface-buy-button::before {
  width: 0 !important;
  transition: none !important;
}

/* Remove brilho/partículas do loading */
.collection-ghostface.ghostface-no-animations .ghostface-buy-button::after {
  display: none !important;
  opacity: 0 !important;
}

/* Efeito simples ao clicar no botão de compra: botão vermelho */
.collection-ghostface.ghostface-no-animations .ghostface-buy-button.ghostface-buy-button-simple-active {
  border-color: rgba(255, 255, 255, 0.74);

  background:
    linear-gradient(
      180deg,
      rgba(169, 0, 0, 0.96),
      rgba(56, 0, 0, 0.98)
    ) !important;

  color: #fff;

  box-shadow:
    0 0 28px rgba(169, 0, 0, 0.42),
    inset 0 0 18px rgba(255, 255, 255, 0.06);

  transform: translateY(0);
}

.collection-ghostface.ghostface-no-animations .ghostface-buy-button.ghostface-buy-button-simple-active::before {
  width: 100% !important;

  background:
    linear-gradient(
      90deg,
      #380000,
      #a90000,
      #5a0000
    ) !important;
}

/* Mantém hover normal do botão comprar */
.collection-ghostface.ghostface-no-animations .ghostface-buy-button:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.92);

  background:
    linear-gradient(
      180deg,
      rgba(169, 0, 0, 0.2),
      rgba(0, 0, 0, 0.82)
    );

  box-shadow:
    0 0 22px rgba(255, 255, 255, 0.08),
    0 0 30px rgba(169, 0, 0, 0.2),
    inset 0 0 20px rgba(255, 255, 255, 0.035);

  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* ================================
   Tablet
   Mantém como está: itens no canto direito
================================ */

@media (max-width: 850px) {
  .collection-ghostface .navbar-ghostface .nav-links {
    gap: 10px;
  }

  .collection-ghostface .ghostface-motion-toggle {
    min-height: 38px;
    padding: 0 10px 0 12px;
    gap: 8px;

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

  .collection-ghostface .ghostface-motion-switch {
    width: 36px;
    height: 18px;
  }

  .collection-ghostface .ghostface-motion-switch-thumb {
    width: 10px;
    height: 10px;
    left: 3px;
  }

  .collection-ghostface .ghostface-motion-toggle[aria-pressed="true"] .ghostface-motion-switch-thumb {
    left: 21px;
  }
}

/* ================================
   Celulares
   Centraliza os itens da navbar
================================ */

@media (max-width: 520px) {
  .collection-ghostface .navbar-ghostface {
    justify-content: space-between;
    padding: 0 10px;
  }

  .collection-ghostface .navbar-ghostface .nav-links {
    width: auto;
    justify-content: center;
    gap: 8px;
  }

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

  .collection-ghostface .navbar-ghostface.is-scrolled .nav-links {
    width: 100%;
    justify-content: center;
  }

  .collection-ghostface .ghostface-motion-toggle {
    padding: 0 8px 0 10px;
    gap: 7px;

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

  .collection-ghostface .ghostface-motion-toggle-text {
    max-width: 118px;

    display: inline-block;

    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .collection-ghostface .ghostface-motion-switch {
    width: 32px;
    height: 17px;
  }

  .collection-ghostface .ghostface-motion-switch-thumb {
    width: 9px;
    height: 9px;
    left: 3px;
  }

  .collection-ghostface .ghostface-motion-toggle[aria-pressed="true"] .ghostface-motion-switch-thumb {
    left: 19px;
  }
}

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

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

  .collection-ghostface .ghostface-motion-toggle {
    padding: 0 7px;
    gap: 6px;

    font-size: 0.48rem;
    letter-spacing: 0.045em;
  }

  .collection-ghostface .ghostface-motion-toggle-text {
    max-width: 104px;
  }

  .collection-ghostface .ghostface-motion-switch {
    width: 30px;
    height: 16px;
  }

  .collection-ghostface .ghostface-motion-switch-thumb {
    width: 8px;
    height: 8px;
    left: 3px;
  }

  .collection-ghostface .ghostface-motion-toggle[aria-pressed="true"] .ghostface-motion-switch-thumb {
    left: 18px;
  }
}

@media (max-width: 340px) {
  .collection-ghostface .ghostface-motion-toggle-text {
    max-width: 92px;
  }

  .collection-ghostface .ghostface-motion-toggle {
    font-size: 0.45rem;
  }
}

/* ================================
   Mobile - Mantém texto completo
   "Desativar Animações"
================================ */

@media (max-width: 600px) {
  .collection-ghostface .ghostface-motion-toggle {
    width: 100%;
    min-height: 38px;

    padding: 0 10px;
    gap: 8px;

    font-size: 0.5rem;
    letter-spacing: 0.045em;
  }

  .collection-ghostface .ghostface-motion-toggle-text {
    max-width: none;

    display: inline-block;

    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }

  .collection-ghostface .ghostface-motion-switch {
    width: 30px;
    height: 16px;
  }

  .collection-ghostface .ghostface-motion-switch-thumb {
    width: 8px;
    height: 8px;
    left: 3px;
  }

  .collection-ghostface .ghostface-motion-toggle[aria-pressed="true"] .ghostface-motion-switch-thumb {
    left: 18px;
  }
}

/* ================================
   Mobile - Botão de animações compacto
================================ */

@media (max-width: 600px) {
  .collection-ghostface .ghostface-motion-toggle-item {
    width: auto;
    min-width: 0;

    flex: 0 0 auto;
  }

  .collection-ghostface .ghostface-motion-toggle {
    width: auto;
    min-width: 0;
    max-width: none;
    min-height: 38px;

    padding: 0 8px;
    gap: 6px;

    flex: 0 0 auto;

    font-size: 0.46rem;
    letter-spacing: 0.035em;
  }

  .collection-ghostface .ghostface-motion-toggle-text {
    max-width: none !important;

    display: inline-block;

    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap;
  }

  .collection-ghostface .ghostface-motion-switch {
    width: 28px;
    height: 15px;

    flex: 0 0 auto;
  }

  .collection-ghostface .ghostface-motion-switch-thumb {
    width: 8px;
    height: 8px;
    left: 3px;
  }

  .collection-ghostface .ghostface-motion-toggle[aria-pressed="true"] .ghostface-motion-switch-thumb {
    left: 17px;
  }

  .collection-ghostface .navbar-ghostface.is-scrolled .ghostface-motion-toggle {
    width: auto;
    min-width: 0;
    max-width: none;

    padding: 0 8px;
  }
}

@media (max-width: 380px) {
  .collection-ghostface .ghostface-motion-toggle {
    padding: 0 7px;
    gap: 5px;

    font-size: 0.42rem;
    letter-spacing: 0.025em;
  }

  .collection-ghostface .ghostface-motion-switch {
    width: 26px;
    height: 15px;
  }

  .collection-ghostface .ghostface-motion-toggle[aria-pressed="true"] .ghostface-motion-switch-thumb {
    left: 15px;
  }
}

/* ================================
   Ghostface Motion - Correção final
   Compacto normal, maior no scroll
================================ */

@media (max-width: 600px) {
  .collection-ghostface .ghostface-motion-toggle-item {
    width: auto;
    min-width: 0;

    flex: 0 0 auto;
  }

  /* Estado normal mobile */
  .collection-ghostface .ghostface-motion-toggle {
    width: auto !important;
    min-width: 0;
    max-width: none;
    min-height: 38px;

    padding: 0 8px;
    gap: 6px;

    flex: 0 0 auto;

    font-size: 0.46rem;
    letter-spacing: 0.035em;
  }

  .collection-ghostface .ghostface-motion-toggle-text {
    max-width: none !important;

    display: inline-block;

    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap;
  }

  .collection-ghostface .ghostface-motion-switch {
    width: 28px;
    height: 15px;

    flex: 0 0 auto;
  }

  .collection-ghostface .ghostface-motion-switch-thumb {
    width: 8px;
    height: 8px;
    left: 3px;
  }

  .collection-ghostface .ghostface-motion-toggle[aria-pressed="true"] .ghostface-motion-switch-thumb {
    left: 17px;
  }

  /* Estado com scroll: fonte igual Home/Carrinho normal */
  .collection-ghostface .navbar-ghostface.is-scrolled .ghostface-motion-toggle {
    width: auto !important;
    min-width: 0;
    max-width: none;
    min-height: 38px;

    padding: 0 10px;
    gap: 7px;

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

  .collection-ghostface .navbar-ghostface.is-scrolled .ghostface-motion-switch {
    width: 30px;
    height: 16px;
  }

  .collection-ghostface .navbar-ghostface.is-scrolled .ghostface-motion-switch-thumb {
    width: 8px;
    height: 8px;
    left: 3px;
  }

  .collection-ghostface .navbar-ghostface.is-scrolled .ghostface-motion-toggle[aria-pressed="true"] .ghostface-motion-switch-thumb {
    left: 18px;
  }
}

@media (max-width: 380px) {
  .collection-ghostface .ghostface-motion-toggle {
    padding: 0 7px;
    gap: 5px;

    font-size: 0.42rem;
    letter-spacing: 0.025em;
  }

  .collection-ghostface .navbar-ghostface.is-scrolled .ghostface-motion-toggle {
    padding: 0 8px;

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

  .collection-ghostface .ghostface-motion-switch {
    width: 26px;
    height: 15px;
  }

  .collection-ghostface .ghostface-motion-toggle[aria-pressed="true"] .ghostface-motion-switch-thumb {
    left: 15px;
  }
}

