/* ============================================================================
   SPINPRO HEADER FRAMEWORK - UNIFIED ACROSS ALL PAGES
   ============================================================================ */

:root {
  --neon-cyan: #00ffc8;
  --neon-green: #39ff14;
  --neon-purple: #b026ff;
  --primary-navy: #0a0e27;
  --dark-gray: #1a1a2e;
  --light-silver: #e0e0e0;
  --gradient-neon: linear-gradient(135deg, #00ffc8 0%, #39ff14 100%);
  --gradient-purple-cyan: linear-gradient(135deg, #b026ff 0%, #00ffc8 100%);
  --gradient-precision: linear-gradient(
    135deg,
    #b026ff 0%,
    #39ff14 50%,
    #00ffc8 100%
  );
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(0, 255, 200, 0.2);
  --glow-cyan: 0 0 20px rgba(0, 255, 200, 0.5);
  --glow-purple: 0 0 20px rgba(176, 38, 255, 0.5);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== SPINPRO HEADER BAR ===== */
.spinpro-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  margin-top: 0;
  /* Full-bleed across .main-content which has 20px side padding */
  margin-left: -20px;
  margin-right: -20px;
  padding: 2px 16px 2px 20px;
  position: sticky;
  top: 0;
  background: #f8f9fa;
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid #e0e0e0;
  border-radius: 0 0 20px 20px;
}

/* Branding Container */
.spinpro-brand-container {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.spinpro-brand-logo {
  font-family: "Space Grotesk", "Arial Black", sans-serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #00ffc8 0%, #39ff14 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(0, 255, 200, 0.5), 0 0 40px rgba(57, 255, 20, 0.3);
  line-height: 1;
  text-transform: uppercase;
}

.spinpro-brand-tagline {
  font-family: "Playfair Display", serif;
  font-size: 9px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 1.5px;
  color: #7b337e;
  line-height: 1;
  margin-left: auto;
  text-transform: uppercase;
}

.spinpro-header-text .header-letter-rest {
  font-size: 28px;
  line-height: 1;
}

/* ===== HEADER ACTIONS (RIGHT SIDE) ===== */
.spinpro-header-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Search Container - Position Relative */
.spinpro-search-container {
  position: relative;
}

/* Search Box - Icon Only */
.spinpro-search-box {
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: var(--transition-smooth);
  cursor: pointer;
  position: relative;
}

.spinpro-search-box:hover,
.spinpro-search-box:focus-within {
  background: rgba(0, 255, 200, 0.1);
  border-radius: 50%;
  box-shadow: var(--glow-cyan);
}

.spinpro-search-box i {
  color: var(--neon-cyan);
  font-size: 13px;
}

.spinpro-search-box input {
  display: none;
}

/* Search Icon - Hover to Show Popup */
.spinpro-search-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

.spinpro-search-icon:hover {
  background: rgba(0, 255, 200, 0.1);
  box-shadow: var(--glow-cyan);
}

.spinpro-search-icon i {
  color: var(--neon-cyan);
  font-size: 13px;
}

.search-popup-box {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%) translateX(-10px);
  width: 200px;
  background: rgba(10, 14, 39, 0.95);
  border: 1px solid rgba(0, 255, 200, 0.3);
  border-radius: 8px;
  padding: 4px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.spinpro-search-container:hover .search-popup-box {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.search-popup-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 200, 0.2);
  border-radius: 6px;
  padding: 5px 8px;
  color: #ffffff !important;
  font-size: 8px !important;
  font-weight: 400 !important;
  outline: none;
  transition: all 0.2s ease;
}

.search-popup-input::selection {
  background: rgba(0, 255, 200, 0.3);
  color: #ffffff;
}

.search-popup-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
}

.search-popup-input:focus {
  border-color: var(--neon-cyan);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 8px rgba(0, 255, 200, 0.2);
}

/* Generic Icon Button Styling */
#basket-widget-btn {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  transition: var(--transition-smooth);
  color: var(--neon-cyan) !important;
  line-height: 1 !important;
}

#basket-widget-btn i {
  color: var(--neon-cyan) !important;
  font-size: 13px;
}

#basket-widget-btn:hover {
  background: rgba(0, 255, 200, 0.1) !important;
  box-shadow: var(--glow-cyan) !important;
  border-radius: 50% !important;
}

#basket-widget-btn span {
  display: none !important;
}

.basket-widget {
  position: relative;
}

.basket-widget .dropdown-toggle {
  display: none !important;
}

.basket-widget .dropdown-menu {
  margin-top: 8px !important;
}

.basket-dropdown {
  background: rgba(10, 14, 39, 0.98) !important;
  border: 1px solid rgba(0, 255, 200, 0.3) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

.basket-dropdown .dropdown-header {
  color: var(--neon-cyan) !important;
  font-size: 14px;
  padding: 12px 16px;
}

.basket-dropdown .dropdown-divider {
  border-color: rgba(0, 255, 200, 0.2) !important;
  margin: 0;
}

.basket-dropdown li {
  color: white;
}

/* Notification Box - Popup Modal */
.spinpro-notification-box {
  position: relative;
}

.notification-bell-icon {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.notification-bell-icon:hover {
  background: rgba(0, 255, 200, 0.1);
  border-radius: 50%;
  box-shadow: var(--glow-cyan);
}

.notification-bell-icon i {
  color: var(--neon-cyan);
  font-size: 13px;
}

.spinpro-notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #ff3366 0%, #ff6b9d 100%);
  color: #707072;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  z-index: 10;
}

/* Notification Popup Modal */
.notification-popup {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  max-height: 400px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
}

.spinpro-notification-box:hover .notification-popup {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.popup-notifications {
  padding: 8px 0;
}

.notification-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  text-decoration: none;
  color: #333333;
  transition: all 0.2s ease;
  background: transparent;
}

.notification-item:hover {
  background: #f0f0f0;
  color: #333333;
  padding-left: 20px;
}

.notification-item.unread {
  background: #f0f8ff;
  border-left: 2px solid var(--neon-cyan);
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 255, 200, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-icon i {
  color: var(--neon-cyan);
  font-size: 16px;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 4px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-time {
  font-size: 12px;
  color: #999999;
  margin: 0;
}

.notification-item.view-all {
  justify-content: center;
  gap: 8px;
  color: var(--neon-cyan);
  font-weight: 600;
  font-size: 13px;
  padding: 12px 16px;
}

.notification-item.view-all i {
  font-size: 13px;
  transition: transform 0.2s ease;
}

.notification-item.view-all:hover i {
  transform: translateX(4px);
}

.notification-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
}

.notification-empty i {
  color: #cccccc;
  font-size: 40px;
}

.notification-empty p {
  color: #999999;
  font-size: 14px;
  margin: 0;
}

/* User Profile Box - Popup Modal */
.spinpro-user-profile-box {
  position: relative;
}

.spinpro-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--neon-cyan);
  cursor: pointer;
  transition: var(--transition-smooth);
  object-fit: cover;
}

.spinpro-user-avatar:hover {
  box-shadow: var(--glow-cyan);
  transform: scale(1.05);
}

/* Profile Popup Modal */
.user-profile-popup {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.spinpro-user-profile-box:hover .user-profile-popup {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f0f0f0;
}

.popup-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--neon-cyan);
  overflow: hidden;
  flex-shrink: 0;
}

.popup-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popup-user-info {
  flex: 1;
  min-width: 0;
}

.popup-username {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 4px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popup-email {
  font-size: 12px;
  color: #666666;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popup-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 255, 200, 0.2),
    transparent
  );
}

.popup-menu {
  padding: 8px 0;
}

.popup-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #333333;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.popup-menu-item:hover {
  background: #f0f0f0;
  color: var(--neon-cyan);
  padding-left: 20px;
}

.popup-menu-item i {
  color: var(--neon-cyan);
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.popup-menu-item span {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}

.popup-footer {
  padding: 8px 0;
}

.popup-menu-item.logout {
  color: #ff3366;
}

.popup-menu-item.logout:hover {
  background: rgba(255, 51, 102, 0.15);
  color: #ff6b9d;
}

.popup-menu-item.logout i {
  color: #ff3366;
}

.popup-menu-item.logout:hover i {
  color: #ff6b9d;
}

.spinpro-user-avatar:hover {
  box-shadow: var(--glow-cyan);
  transform: scale(1.05);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .spinpro-header-bar {
    padding: 12px 16px;
  }

  .spinpro-logo {
    height: 150px;
  }

  .spinpro-header-text .header-letter-first {
    font-size: 48px;
  }

  .spinpro-header-text .header-letter-rest {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .spinpro-header-bar {
    flex-wrap: wrap;
    padding: 12px 12px;
  }

  .spinpro-logo {
    height: 120px;
    order: 1;
  }

  .spinpro-header-text {
    order: 2;
    width: 100%;
    margin: 8px 0;
  }

  .spinpro-header-text .header-letter-first {
    font-size: 40px;
  }

  .spinpro-header-text .header-letter-rest {
    font-size: 30px;
  }

  .spinpro-header-actions {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .spinpro-header-bar {
    padding: 8px;
  }

  .spinpro-logo {
    height: 100px;
  }

  .spinpro-header-text .header-letter-first {
    font-size: 32px;
  }

  .spinpro-header-text .header-letter-rest {
    font-size: 24px;
  }

  .spinpro-search-box {
    display: none;
  }

  .spinpro-header-actions {
    gap: 8px;
  }
}
