@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&display=swap');

/* Header-specific design system */
:root {
  --primary-color: #fc3c8a;         /* Nykaa Hot Pink */
  --primary-hover: #e02873;
  --secondary-color: #ff5e62;       /* Warm Coral */
  --accent-color: #ff9966;          /* Peach */
  --bg-gradient: linear-gradient(90deg, #fc3c8a 0%, #ff5e62 40%, #ff9966 80%, #ffbe53 100%);
  --dark-text: #1f2937;             /* Slate 800 */
  --light-text: #6b7280;            /* Slate 500 */
  --border-color: #e5e7eb;          /* Slate 200 */
  --bg-light: #f9fafb;              /* Slate 50 */
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --font-sans: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height-desktop: 120px;
  --header-height-mobile: 70px;
}

/* Base styles for header functionality */
header.site-header {
  font-family: var(--font-sans);
  background-color: var(--white);
  border-bottom: 1px solid var(--border-color);
  width: 100%;
  position: relative;
  z-index: 100;
}

header.site-header.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  box-shadow: var(--shadow-md);
  animation: slideDown 0.3s ease-in-out;
}

header.site-header.sticky-header .top-bar {
  display: none; /* Hide top bar on scroll for compactness */
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Top Bar Styling */
.top-bar {
  background: var(--bg-gradient);
  color: var(--white);
  padding: 8px 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.top-bar-promo {
  font-family: var(--font-heading);
  animation: pulsePromo 3s infinite ease-in-out;
}

@keyframes pulsePromo {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; transform: scale(1.02); }
}

.top-bar-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 20px;
  align-items: center;
}

.top-bar-links li {
  display: flex;
  align-items: center;
}

.top-bar-links li:not(:last-child)::after {
  content: "|";
  margin-left: 20px;
  opacity: 0.5;
}

.top-bar-links a {
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.top-bar-links a:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

.top-bar-links a i {
  font-size: 14px;
}

/* Main Header Bar Styling */
.main-header {
  padding: 15px 0;
  background: var(--white);
}

.main-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 30px;
}

/* Logo container */
.header-logo {
  flex-shrink: 0;
}

.header-logo a {
  display: block;
}

.header-logo img {
  height: 50px;
  width: auto;
  object-fit: contain;
  transition: var(--transition);
}

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

/* Desktop Navigation */
.desktop-nav {
  display: flex;
  align-items: center;
  flex-grow: 1;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 24px;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark-text);
  text-decoration: none;
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.nav-link:hover, .nav-item.active .nav-link {
  color: var(--primary-color);
}

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

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

/* Header Actions Styling */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

/* Sign In Button */
.btn-signin {
  font-family: var(--font-heading);
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(252, 60, 138, 0.2);
}

.btn-signin:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(252, 60, 138, 0.3);
}

.btn-signin:active {
  transform: translateY(0);
}

/* Cart Icon Bag */
.cart-trigger {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dark-text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: var(--transition);
}

.cart-trigger:hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
}

.cart-trigger svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.8px;
}

.cart-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: var(--primary-color);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
  box-shadow: var(--shadow-sm);
}

/* Hamburger & Responsive Mobile Toggles */
.mobile-triggers {
  display: none;
  align-items: center;
  gap: 12px;
}

.hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dark-text);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: var(--transition);
}

.hamburger-btn:hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
}

/* Drawer overlay */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Sliding Mobile Navigation Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100%;
  background-color: var(--white);
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-drawer.active {
  left: 0;
}

.drawer-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-light);
}

.drawer-logo img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.drawer-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--light-text);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.drawer-close:hover {
  color: var(--primary-color);
  transform: rotate(90deg);
}

.drawer-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px 0;
}

/* Mobile navigation items */
.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-item {
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.mobile-nav-link {
  font-family: var(--font-heading);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark-text);
  text-decoration: none;
  transition: var(--transition);
}

.mobile-nav-link:hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
}

.drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-light);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-footer .btn-signin {
  width: 100%;
}

.drawer-promo {
  text-align: center;
  font-size: 11px;
  color: var(--light-text);
  font-weight: 500;
  margin-top: 8px;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .main-header .container {
    gap: 20px;
  }
  
  .nav-menu {
    gap: 16px;
  }
  
  .nav-link {
    font-size: 14px;
  }
  
  .btn-signin {
    padding: 8px 18px;
    font-size: 13px;
  }
}

@media (max-width: 900px) {
  /* Switch navigation to mobile drawer layout */
  .desktop-nav, .header-actions .btn-signin {
    display: none;
  }
  
  .mobile-triggers {
    display: flex;
  }
  
  header.site-header {
    height: var(--header-height-mobile);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .main-header {
    padding: 0;
    width: 100%;
  }
  
  .main-header .container {
    padding: 0 15px;
    height: 100%;
    align-items: center;
  }
  
  .header-logo img {
    height: 38px;
  }
  
  .top-bar {
    display: none !important; /* Always hide top bar on mobile */
  }
  
  header.site-header.sticky-header {
    position: fixed;
    height: var(--header-height-mobile);
  }
}
