:root {
  --footer-bg: var(--footer-background, #1f2937);
  --footer-fg: var(--footer-text, #f3f4f6);
}

.footer {
  background: var(--footer-bg);
  color: var(--footer-fg);
  margin-top: 2.5rem;
  padding: 1.5rem 1rem 1rem;
  font-size: 0.9rem;
  text-align: left;
}

.footer a {
  color: inherit;
  text-decoration: none;
  opacity: 0.92;
}

.footer a:hover,
.footer a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 1;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}

.footer-section h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.footer-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-section li {
  margin: 0.35rem 0;
}

.footer-section p {
  margin: 0.35rem 0;
}

.footer-bottom {
  max-width: 1200px;
  margin: 1rem auto 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.footer-left,
.footer-right {
  flex: 1 1 240px;
  min-width: 220px;
}

.footer-right {
  text-align: left;
}

.payment-icons img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  margin: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 4px;
}

.footer-top-btn {
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  line-height: 1;
}

.footer-top-btn:hover,
.footer-top-btn:focus-visible {
  background: rgba(255, 255, 255, 0.2);
}

.payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.payment-method {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.copyright {
  margin: 0;
  opacity: 0.92;
  font-size: 0.85rem;
}

/* Toast / notifications */
.toast {
  position: fixed;
  right: 16px;
  top: 16px;
  z-index: 10000;
  max-width: min(360px, 92vw);
  background: var(--background, #ffffff);
  color: var(--text-primary, #111827);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.hidden {
  display: none;
}

@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .footer {
    padding: 1.25rem 0.9rem 0.9rem;
    font-size: 0.85rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    justify-content: flex-start;
  }

  .payment-methods {
    justify-content: flex-start;
  }
}
