/**
 * SNAP COMMERCE UI Components
 * GNB Navigation, Buttons, Toast Alerts, Modals, Badges
 */

/* ==========================================
   HEADER & GNB
   ========================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  transition: all var(--speed-normal);
  background: transparent;
}

.header.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  transition: transform var(--speed-fast);
}

.header-logo-link:hover .header-logo {
  transform: scale(1.03);
}

/* Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color var(--speed-fast);
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--coral-primary);
  transition: width var(--speed-fast);
}

.nav-link:hover, .nav-link.active {
  color: #FFF;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Mobile Hamburger */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #FFF;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

/* Mobile Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 360px;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  z-index: 1000;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: right var(--speed-normal);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.8);
}

.mobile-nav-drawer.open {
  right: 0;
}

.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--speed-normal);
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: #FFF;
  font-size: 1.5rem;
  cursor: pointer;
  margin-bottom: 24px;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-nav-list a {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

@media (max-width: 1024px) {
  .nav-menu { display: none; }
  .mobile-toggle { display: block; }
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all var(--speed-normal);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--coral-primary);
  color: #FFF;
  box-shadow: 0 10px 20px var(--coral-glow);
}

.btn-primary:hover {
  background: var(--coral-hover);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px var(--coral-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFF;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #FFF;
  transform: translateY(-2px);
}

.btn-outline-coral {
  background: transparent;
  border: 1px solid var(--coral-primary);
  color: var(--coral-primary);
}

.btn-outline-coral:hover {
  background: var(--coral-primary);
  color: #FFF;
  box-shadow: 0 0 20px var(--coral-glow);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

/* ==========================================
   TOAST NOTIFICATION
   ========================================== */
.toast-container {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: var(--bg-tertiary);
  border: 1px solid var(--coral-primary);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 20px var(--coral-glow);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  color: #FFF;
  font-size: 0.95rem;
  font-weight: 600;
  transform: translateY(50px);
  opacity: 0;
  transition: all var(--speed-normal);
  pointer-events: auto;
}

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

.toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--coral-primary);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* ==========================================
   MODAL DIALOG
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 17, 32, 0.85);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--speed-normal);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 600px;
  width: 100%;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  transform: scale(0.9);
  transition: transform var(--speed-normal);
}

.modal-overlay.open .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--speed-fast);
}

.modal-close:hover {
  color: #FFF;
}
