/* =============================================================================
   8. OVERLAY BASE
============================================================================= */
.overlay-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 60px 0 0 0;
  overflow-y: auto;
  text-align: center;
  box-sizing: border-box;

  background-color: rgba(0, 0, 0, 0.6);

  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.overlay-panel::before {
  content: "";
  position: fixed;
  inset: 0;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(10px);
  z-index: -1;

  background-color: rgba(17, 14, 15, 0.388);

}



.overlay-panel.visible {
  display: flex;
}

.close-overlay,
.back-button {
  position: fixed;
  top: 20px;
  z-index: 130;
  width: 26px;
  image-rendering: auto;
}

.close-overlay {
  right: 35px;
  width: 3%;
}

.back-button {
  left: 20px;
}

/* =============================================================================
   19. GALLERY LIGHTBOX
============================================================================= */
#gallery-fullscreen-overlay {
  z-index: 200;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.9);
}

#gallery-fullscreen-overlay .close-overlay {
  color: var(--color-white);
  font-size: 50px;
  font-weight: bold;
  opacity: 0.8;
}

#gallery-fullscreen-overlay .close-overlay:hover {
  opacity: 1;
}

#fullscreen-image {
  max-width: 85vw;
  max-height: 80vh;
  object-fit: contain;
  border: 3px solid var(--color-white);
  border-radius: var(--radius-sm);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-white);
  font-size: 3em;
  font-weight: bold;
  transition: color var(--transition-fast);
}

.gallery-nav:hover {
  color: var(--color-gold);
}

.gallery-nav.prev {
  left: 5%;
}

.gallery-nav.next {
  right: 5%;
}

/* =============================================================================
   19. SCROLLBAR
============================================================================= */
.overlay-panel::-webkit-scrollbar,
#cart-items-container::-webkit-scrollbar {
  width: 8px;
}

.overlay-panel::-webkit-scrollbar-track,
#cart-items-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.overlay-panel::-webkit-scrollbar-thumb,
#cart-items-container::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 4px;
  background-color: var(--color-gold);
  background-clip: content-box;
}

.overlay-panel::-webkit-scrollbar-thumb:hover,
#cart-items-container::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-gold-strong);
}

.toast-stack {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(26, 22, 18, 0.96), rgba(12, 10, 9, 0.96));
  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  color: var(--color-white);
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
  pointer-events: auto;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
}

.toast--success {
  border-color: rgba(255, 215, 0, 0.45);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.35),
    0 0 22px rgba(255, 215, 0, 0.16);
}

.toast--error {
  border-color: rgba(255, 107, 107, 0.45);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.35),
    0 0 22px rgba(255, 107, 107, 0.16);
}

.toast--info {
  border-color: rgba(255, 255, 255, 0.2);
}

.toast__content {
  min-width: 0;
}

.toast__title {
  margin-bottom: 4px;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-gold);
}

.toast__message {
  font-family: var(--font-body);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.65); /* Subtler gray */
}

.toast-highlight {
  color: #fff; /* Pure white */
  font-weight: 500;
}

.toast__close {
  flex-shrink: 0;
  min-width: 28px;
  min-height: 28px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  font-size: 1rem;
  line-height: 1;
  transition: background-color var(--transition-base), transform var(--transition-fast);
}

.toast__close:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.05);
}

/* =============================================================================
   21. EXTRA FRAME FOR OTHER OVERLAYS
============================================================================= */
#gallery-overlay .shop-item-image-wrapper img,
#tools-overlay .shop-item-image-wrapper img,
#social-overlay .shop-item-image-wrapper img {
  border: 4px solid white;
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}