/* =====================================================
   RheynShoppie - Main Stylesheet
   Modern, Premium Digital Products Shop
   ===================================================== */

/* Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap");

/* =====================================================
   CSS Variables / Design Tokens
   ===================================================== */
:root {
  /* Colors */
  --color-primary: #7c3aed;
  --color-primary-light: #8b5cf6;
  --color-primary-dark: #6d28d9;
  --color-primary-50: #f5f3ff;
  --color-primary-100: #ede9fe;
  --color-primary-200: #ddd6fe;

  --color-secondary: #0f172a;
  --color-secondary-light: #1e293b;

  --color-success: #10b981;
  --color-success-light: #d1fae5;
  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;
  --color-danger: #ef4444;
  --color-danger-light: #fee2e2;
  --color-info: #3b82f6;
  --color-info-light: #dbeafe;

  /* Backgrounds */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-dark: #0f172a;
  --bg-dark-secondary: #1e293b;

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-light: #ffffff;
  --text-muted: #64748b;

  /* Borders */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-dark: #94a3b8;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 10px 40px -10px rgba(124, 58, 237, 0.4);

  /* Typography */
  --font-heading: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont,
    sans-serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Sizing */
  --container-max: 1200px;
  --container-padding: 1.5rem;
  --header-height: 80px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Z-Index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* =====================================================
   CSS Reset & Base Styles
   ===================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Support for safe areas on notched devices */
  padding-top: env(safe-area-inset-top, 0);
}

/* Main content should start after header */
main {
  padding-top: var(--header-height);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: 3rem;
}
h2 {
  font-size: 2.25rem;
}
h3 {
  font-size: 1.75rem;
}
h4 {
  font-size: 1.5rem;
}
h5 {
  font-size: 1.25rem;
}
h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Icons - Lucide */
[data-lucide] {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  display: inline-block;
  vertical-align: middle;
}

.logo-icon [data-lucide] {
  width: 24px;
  height: 24px;
}

.btn [data-lucide],
.dropdown-item [data-lucide] {
  width: 18px;
  height: 18px;
}

.cart-btn [data-lucide] {
  width: 22px;
  height: 22px;
}

/* =====================================================
   Layout Components
   ===================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.container-wide {
  max-width: 1400px;
}

.section {
  padding: 5rem 0;
}

.section-sm {
  padding: 3rem 0;
}

.section-lg {
  padding: 7rem 0;
}

/* Grid System */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Flexbox Utilities */
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.items-start {
  align-items: flex-start;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-1 {
  gap: 0.5rem;
}
.gap-2 {
  gap: 1rem;
}
.gap-3 {
  gap: 1.5rem;
}
.gap-4 {
  gap: 2rem;
}

/* =====================================================
   Main Content Wrapper
   ===================================================== */
.main-content {
  padding-top: var(--header-height);
}

/* =====================================================
   Header & Navigation
   ===================================================== */
.header {
  position: fixed;
  top: env(safe-area-inset-top, 0);
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  z-index: var(--z-sticky);
  transition: all var(--transition-base);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-primary-dark)
  );
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* User dropdown button */
.user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-btn .user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-btn .dropdown-arrow {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.cart-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.cart-btn:hover {
  background: var(--color-primary-50);
  color: var(--color-primary);
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--color-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Notification Bell */
.notification-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.notification-btn:hover {
  background: var(--color-primary-50);
  color: var(--color-primary);
}

.notification-btn [data-lucide] {
  width: 20px;
  height: 20px;
}

.notification-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-count.has-notifications {
  background: var(--color-danger);
  color: white;
  animation: notificationPulse 2s infinite;
}

@keyframes notificationPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Notification Popup */
.notification-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.notification-overlay.active {
  opacity: 1;
  visibility: visible;
}

.notification-popup {
  position: fixed;
  top: calc(var(--header-height) + 0.5rem);
  right: 1rem;
  width: 380px;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - var(--header-height) - 2rem);
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: calc(var(--z-modal) + 1);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.notification-popup.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notification-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notification-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.notification-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.notification-close:hover {
  background: var(--color-danger);
  color: white;
}

.notification-body {
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
}

.notification-loading {
  padding: 2rem;
  text-align: center;
  color: var(--text-tertiary);
}

.notification-empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-tertiary);
}

.notification-empty i {
  width: 48px;
  height: 48px;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.notification-item {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.2s ease;
}

.notification-item:hover {
  background: var(--bg-secondary);
}

.notification-item.unread {
  background: var(--color-primary-50);
}

.notification-item.unread:hover {
  background: var(--color-primary-100);
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-primary);
}

.notification-icon [data-lucide] {
  width: 20px;
  height: 20px;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.125rem;
  color: var(--text-primary);
}

.notification-message {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-time {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.notification-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
}

/* Mobile Notification Popup */
@media (max-width: 480px) {
  .notification-popup {
    top: var(--header-height);
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - var(--header-height));
    border-radius: 0;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
  }
  
  .notification-btn {
    width: 38px;
    height: 38px;
  }
  
  .notification-count {
    min-width: 16px;
    height: 16px;
    font-size: 0.65rem;
  }
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

/* =====================================================
   Buttons
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-primary-dark)
  );
  color: white;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 44px -10px rgba(124, 58, 237, 0.5);
  color: white;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

.btn-dark {
  background: var(--bg-dark);
  color: white;
}

.btn-dark:hover {
  background: var(--bg-dark-secondary);
  color: white;
}

.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1.125rem 2.25rem;
  font-size: 1.05rem;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* =====================================================
   Form Elements
   ===================================================== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-100);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.form-check-input {
  width: 20px;
  height: 20px;
  accent-color: var(--color-primary);
}

.form-error {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-danger);
}

.input-group {
  display: flex;
}

.input-group .form-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* =====================================================
   Cards
   ===================================================== */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-secondary);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-title a {
  color: var(--text-primary);
}

.card-title a:hover {
  color: var(--color-primary);
}

.card-text {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Product Card */
.product-card {
  position: relative;
}

.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  z-index: 1;
}

.badge-featured {
  background: var(--color-primary);
  color: white;
}

.badge-sale {
  background: var(--color-danger);
  color: white;
}

.badge-new {
  background: var(--color-success);
  color: white;
}

.product-price {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}

.product-price-old {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  text-decoration: line-through;
  margin-right: 0.5rem;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--color-warning);
  font-size: 0.875rem;
}

.product-rating span {
  color: var(--text-tertiary);
  margin-left: 0.25rem;
}

/* =====================================================
   Hero Section
   ===================================================== */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  padding: 6rem 0;
  /* Removed margin-top - now handled by .main-content padding-top */
  background: linear-gradient(
    135deg,
    var(--bg-secondary) 0%,
    var(--bg-primary) 100%
  );
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle,
    rgba(124, 58, 237, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(124, 58, 237, 0.08) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-primary-100);
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.hero-title span {
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-primary-light)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.hero-stat {
  text-align: left;
}

.hero-stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.hero-stat-label {
  font-size: 0.9rem;
  color: var(--text-tertiary);
}

/* =====================================================
   Section Headers
   ===================================================== */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header.left {
  text-align: left;
}

.section-tag {
  display: inline-block;
  padding: 0.375rem 1rem;
  background: var(--color-primary-100);
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* =====================================================
   Footer
   ===================================================== */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
}

.footer-text {
  color: var(--text-tertiary);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.footer-social a i,
.footer-social a svg {
  width: 20px;
  height: 20px;
}

.footer-social a:hover {
  background: var(--color-primary);
  transform: translateY(-2px);
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-tertiary);
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
}

.footer-links a:hover {
  color: white;
  padding-left: 4px;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copyright {
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a {
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

.footer-legal a:hover {
  color: white;
}

/* =====================================================
   Badges
   ===================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.badge-primary {
  background: var(--color-primary-100);
  color: var(--color-primary);
}

.badge-success {
  background: var(--color-success-light);
  color: var(--color-success);
}

.badge-warning {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.badge-danger {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.badge-info {
  background: var(--color-info-light);
  color: var(--color-info);
}

/* =====================================================
   Alerts
   ===================================================== */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.alert-success {
  background: var(--color-success-light);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-error {
  background: var(--color-danger-light);
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-warning {
  background: var(--color-warning-light);
  color: #92400e;
  border: 1px solid #fde68a;
}

.alert-info {
  background: var(--color-info-light);
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* =====================================================
   Toast Notifications
   ===================================================== */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 1rem);
  right: 1rem;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  min-width: 300px;
  padding: 1rem 1.25rem;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-success .toast-icon {
  background: var(--color-success);
  color: white;
}

.toast-error .toast-icon {
  background: var(--color-danger);
  color: white;
}

.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
}

/* =====================================================
   Modal
   ===================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* =====================================================
   Tables
   ===================================================== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.table th {
  background: var(--bg-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: var(--bg-secondary);
}

/* =====================================================
   Pagination
   ===================================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.pagination-item {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.pagination-item:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pagination-item.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.pagination-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* =====================================================
   Dropdown Menu
   ===================================================== */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 180px;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-fast);
  z-index: var(--z-dropdown);
}

.dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(4px);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--bg-secondary);
  color: var(--color-primary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0.5rem 0;
}

/* =====================================================
   Utility Classes
   ===================================================== */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}
.text-primary {
  color: var(--color-primary);
}
.text-secondary {
  color: var(--text-secondary);
}
.text-muted {
  color: var(--text-tertiary);
}
.text-success {
  color: var(--color-success);
}
.text-danger {
  color: var(--color-danger);
}
.text-warning {
  color: var(--color-warning);
}

.bg-primary {
  background: var(--color-primary);
}
.bg-secondary {
  background: var(--bg-secondary);
}
.bg-dark {
  background: var(--bg-dark);
}

.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}
.mt-4 {
  margin-top: 2rem;
}
.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}
.mb-4 {
  margin-bottom: 2rem;
}

.hidden {
  display: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* =====================================================
   Loading States
   ===================================================== */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-light);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 25%,
    var(--bg-tertiary) 50%,
    var(--bg-secondary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* =====================================================
   Mobile Menu
   ===================================================== */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  top: var(--header-height);
  background: rgba(0, 0, 0, 0.5);
  z-index: calc(var(--z-sticky) - 2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: calc(var(--z-sticky) - 1);
  display: flex;
  flex-direction: column;
  padding: 1rem;
  overflow-y: auto;
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
}

.mobile-menu.active {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.mobile-nav-link i,
.mobile-nav-link svg {
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: var(--color-primary);
  color: white;
}

.mobile-nav-link:hover i,
.mobile-nav-link:hover svg,
.mobile-nav-link.active i,
.mobile-nav-link.active svg {
  color: white;
}

.mobile-nav-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0.5rem 0;
}

.mobile-nav-primary {
  background: var(--color-primary);
  color: white;
}

.mobile-nav-primary i,
.mobile-nav-primary svg {
  color: white;
}

.mobile-nav-primary:hover {
  background: var(--color-primary-dark);
}

/* Mobile menu toggle animation */
.menu-toggle.active span:first-child {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:last-child {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 199;
  display: none;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* =====================================================
   Touch-Friendly Enhancements
   ===================================================== */
/* Minimum touch target size of 44px */
@media (max-width: 1024px) {
  .btn {
    min-height: 44px;
  }
  
  .btn-sm {
    min-height: 40px;
    padding: 0.625rem 1rem;
  }
  
  .nav-link,
  .dropdown-item {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    min-height: 48px;
    font-size: 16px; /* Prevents iOS zoom */
  }
  
  .form-check-input {
    width: 24px;
    height: 24px;
  }
  
  .pagination-item {
    min-width: 44px;
    min-height: 44px;
  }
}

/* =====================================================
   Responsive Design
   ===================================================== */
@media (max-width: 1200px) {
  .container {
    max-width: 100%;
    padding: 0 2rem;
  }
  
  .hero-title {
    font-size: 3rem;
  }
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Header adjustments */
  .header-actions {
    gap: 0.75rem;
  }
  
  .header-actions .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
    --container-padding: 1rem;
  }

  h1 {
    font-size: 1.875rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.25rem;
  }
  h4 {
    font-size: 1.125rem;
  }

  /* Header Mobile Fixes */
  .nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
    order: 10;
    margin-left: 0.5rem;
  }
  
  .logo {
    font-size: 1.125rem;
    gap: 0.5rem;
  }
  
  .logo-icon {
    width: 36px;
    height: 36px;
  }
  
  .logo-icon [data-lucide] {
    width: 20px;
    height: 20px;
  }
  
  .header-actions {
    gap: 0.375rem;
    flex-shrink: 0;
  }
  
  /* Ensure menu toggle is always visible */
  .menu-toggle {
    flex-shrink: 0;
    padding: 8px;
  }
  
  /* Hide Login and Sign Up buttons on mobile - available in sidebar */
  .header-actions > .btn-primary,
  .header-actions > .btn-secondary {
    display: none;
  }
  
  /* Logo shrink on mobile */
  .logo {
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
  }
  
  /* When logged in - show only avatar icon on mobile */
  .user-btn {
    padding: 0.5rem !important;
    min-width: 40px;
    height: 40px;
    justify-content: center;
  }
  
  .user-btn .user-name {
    display: none;
  }
  
  .user-btn .dropdown-arrow {
    display: none;
  }
  
  /* Notification button mobile size */
  .notification-btn {
    width: 40px;
    height: 40px;
  }
  
  /* Cart button */
  .cart-btn {
    width: 38px;
    height: 38px;
  }
  
  .cart-btn [data-lucide] {
    width: 20px;
    height: 20px;
  }
  
  .cart-count {
    min-width: 16px;
    height: 16px;
    font-size: 0.65rem;
    top: -2px;
    right: -2px;
  }

  /* Hero Mobile */
  .hero {
    padding: 3rem 0;
    min-height: auto;
  }
  
  .hero-title {
    font-size: 1.875rem;
    margin-bottom: 1rem;
  }

  .hero-text {
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
    margin-top: 2rem;
  }
  
  .hero-stat-value {
    font-size: 1.5rem;
  }

  .section {
    padding: 3rem 0;
  }
  
  .section-sm {
    padding: 2rem 0;
  }
  
  .section-lg {
    padding: 4rem 0;
  }

  .section-title {
    font-size: 1.75rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
  }
  
  .section-header {
    margin-bottom: 2rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer {
    padding: 3rem 0 1.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .footer-brand {
    max-width: none;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.25rem;
  }
  
  /* Card adjustments */
  .card-body {
    padding: 1.25rem;
  }
  
  .card-footer {
    padding: 0.875rem 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  /* Tables */
  .table-wrapper {
    margin: 0 -1.25rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  .table th,
  .table td {
    padding: 0.75rem;
    font-size: 0.875rem;
  }
  
  /* Modal adjustments */
  .modal-overlay {
    padding: 0.75rem;
    align-items: flex-end;
  }
  
  .modal {
    max-width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 85vh;
  }
  
  /* Toast adjustments */
  .toast-container {
    left: 0.75rem;
    right: 0.75rem;
    top: calc(var(--header-height) + 0.75rem);
  }
  
  .toast {
    min-width: auto;
    width: 100%;
  }
  
  /* Dropdown adjustments */
  .dropdown-menu {
    min-width: 160px;
  }
}

@media (max-width: 480px) {
  :root {
    --container-padding: 1rem;
  }
  
  body {
    font-size: 15px;
  }

  h1 {
    font-size: 1.75rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.25rem;
  }

  /* Extra small screen header fixes */
  .container {
    padding: 0 0.75rem;
  }
  
  .logo {
    font-size: 1rem;
  }
  
  .logo-icon {
    width: 32px;
    height: 32px;
  }
  
  .logo-icon [data-lucide] {
    width: 18px;
    height: 18px;
  }
  
  .cart-btn {
    width: 36px;
    height: 36px;
  }
  
  .menu-toggle {
    padding: 6px;
  }

  .hero {
    padding: 3rem 0;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
  
  .hero-title {
    font-size: 1.875rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .hero-stats {
    gap: 1rem;
    justify-content: space-between;
  }
  
  .hero-stat {
    min-width: calc(50% - 0.5rem);
  }

  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }
  
  .btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .section-tag {
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
  }
  
  /* Form adjustments */
  .form-group {
    margin-bottom: 1.25rem;
  }
  
  .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.375rem;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    padding: 0.75rem;
    font-size: 16px;
  }
  
  /* Alert adjustments */
  .alert {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
  }
  
  /* Badge adjustments */
  .badge {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
  }
  
  /* Pagination */
  .pagination {
    gap: 0.375rem;
    flex-wrap: wrap;
  }
  
  .pagination-item {
    min-width: 38px;
    height: 38px;
    font-size: 0.875rem;
  }
  
  /* Footer */
  .footer-title {
    font-size: 0.9375rem;
    margin-bottom: 1rem;
  }
  
  .footer-links a {
    font-size: 0.875rem;
  }
  
  .footer-text {
    font-size: 0.875rem;
  }
  
  .footer-social a {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 360px) {
  :root {
    --container-padding: 0.875rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  .hero-title {
    font-size: 1.625rem;
  }
  
  .hero-text {
    font-size: 0.9375rem;
  }
  
  .btn {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }
  
  .hero-stats {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .hero-stat {
    min-width: 100%;
  }
}

/* =====================================================
   Landscape Orientation Adjustments
   ===================================================== */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 2rem 0;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-stats {
    margin-top: 1.5rem;
  }
  
  .mobile-menu {
    padding: 1rem;
  }
  
  .mobile-nav-link {
    padding: 0.75rem 1rem;
  }
}

/* =====================================================
   Print Styles
   ===================================================== */
@media print {
  .header,
  .footer,
  .mobile-menu,
  .menu-toggle,
  .sidebar-overlay {
    display: none !important;
  }
  
  .main-content {
    margin-top: 0 !important;
  }
  
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
}
