/* ============================================
   PR-Store Main Stylesheet
   Professional Color Palette: #2872A1 / #CBDDE9
   Light, clean, production-ready design
   ============================================ */

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Accessible focus styles */
*:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
*:focus:not(:focus-visible) {
  outline: none;
}
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

a {
  text-decoration: none;
}

:root {
  /* Primary palette */
  --primary: #2872A1;
  --primary-dark: #1E5A82;
  --primary-light: #3A8BBD;
  --secondary: #CBDDE9;
  --secondary-dark: #A8C4D6;
  --secondary-light: #E3EDF4;

  /* Neutrals */
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;

  /* Status */
  --success: #16A34A;
  --danger: #DC2626;
  --warning: #D97706;
  --info: #2872A1;

  /* Surfaces */
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --border: #E2E8F0;
  --border-dark: #CBD5E1;

  /* Text */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ============================================
   NAVIGATION BAR
   ============================================ */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Back button before logo */
.nav-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--secondary-light, #CBDDE9);
  color: var(--primary, #2872A1);
  text-decoration: none;
  font-size: 16px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.nav-back-btn:hover {
  background: var(--primary, #2872A1);
  color: var(--white, #fff);
}

/* Back to Cart link (checkout page) */
.back-to-cart-link {
  width: auto !important;
  padding: 8px 16px !important;
  font-size: 14px !important;
  font-weight: 500;
  gap: 6px;
  color: var(--primary, #2872A1) !important;
  background: var(--secondary-light, #CBDDE9) !important;
  border-radius: 8px;
  white-space: nowrap;
}

.back-to-cart-link:hover {
  background: var(--primary, #2872A1) !important;
  color: var(--white, #fff) !important;
}

.logo a {
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo a:hover {
  opacity: 0.85;
}

.logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-text {
  color: var(--primary);
  font-weight: 800;
}

/* Footer Logo */
.footer-logo {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-logo-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Search */
.search-bar {
  flex: 1;
  display: flex;
  max-width: 560px;
  min-width: 200px;
  position: relative;
}

.search-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border-dark);
  border-radius: 8px 0 0 8px;
  font-size: 14px;
  background-color: var(--white);
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
  min-width: 0;
}

.search-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(40, 114, 161, 0.1);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-btn {
  padding: 10px 20px;
  background: var(--primary);
  color: var(--text-inverse);
  border: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.search-btn:hover {
  background: var(--primary-dark);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow-xl);
  max-height: 420px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  border: 1px solid var(--border);
}

.search-suggestions.active {
  display: block;
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--gray-100);
}

.search-suggestion-item:hover {
  background: var(--secondary-light);
}

.search-suggestion-item:last-child {
  border-bottom: none;
}

.search-suggestion-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 14px;
  background-color: var(--gray-100);
  border: 1px solid var(--border);
}

.search-suggestion-info {
  flex: 1;
}

.search-suggestion-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  font-size: 14px;
}

.search-suggestion-price {
  font-size: 13px;
  color: var(--primary);
  font-weight: 700;
}

.search-no-results {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
}

/* Nav Icons */
.nav-icons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 18px;
  position: relative;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: transparent;
}

.nav-link:hover {
  color: var(--primary);
  background: var(--secondary-light);
}

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: var(--text-inverse);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.user-profile {
  position: relative;
}

.profile-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color var(--transition-fast);
}

.profile-btn:hover {
  color: var(--primary);
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 10;
  margin-top: 8px;
  overflow: hidden;
}

.dropdown-menu.active {
  display: block;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background var(--transition-fast);
  font-weight: 500;
  font-size: 14px;
}

.dropdown-menu a:hover {
  background: var(--secondary-light);
  color: var(--primary);
}

.dropdown-menu hr {
  margin: 0;
  border: none;
  border-top: 1px solid var(--border);
}

/* Wishlist Nav Link */
.wishlist-link {
  color: var(--danger) !important;
}

.wishlist-link:hover {
  color: #B91C1C !important;
  background: #FEF2F2 !important;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn,
.btn-primary {
  background: var(--primary);
  color: var(--text-inverse);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.btn:hover,
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
}

.btn:active,
.btn-primary:active {
  background: #174F73;
}

.btn-primary:disabled,
.btn-outline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-secondary {
  background: var(--secondary);
  color: var(--primary-dark);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--secondary-dark);
}

.btn-secondary:active {
  background: #96B5CA;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--text-inverse);
}

.btn-small {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-danger {
  background: var(--danger, #DC2626);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition-fast);
}

.btn-danger:hover {
  background: #B91C1C;
}

.btn-danger.btn-small {
  padding: 6px 14px;
  font-size: 13px;
}

.full-width {
  width: 100%;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--white);
  padding: 36px;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
}

.close-btn {
  position: absolute;
  right: 16px;
  top: 16px;
  font-size: 22px;
  font-weight: bold;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  color: var(--text-primary);
  background: var(--gray-100);
}

.auth-tab h2 {
  margin-bottom: 24px;
  color: var(--text-primary);
  font-weight: 700;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color var(--transition-fast);
  background-color: var(--white);
  color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(40, 114, 161, 0.1);
}

/* Password Input with Toggle */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 48px !important;
}

.password-input-wrapper input::-ms-reveal,
.password-input-wrapper input::-ms-clear {
  display: none;
}

.password-input-wrapper input::-webkit-credentials-auto-fill-button {
  display: none !important;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
  z-index: 2;
  border-radius: 4px;
}

.password-toggle:hover {
  color: var(--primary);
}

.password-toggle i {
  font-size: 16px;
}

/* ============================================
   OTP Verification
   ============================================ */
.otp-verification {
  text-align: center;
}

.otp-message {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

.otp-message i {
  font-size: 28px;
  color: var(--primary);
  display: block;
  margin-bottom: 12px;
}

.otp-message strong {
  color: var(--primary);
  word-break: break-all;
}

.otp-input-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

.otp-input {
  width: 100% !important;
  max-width: 220px !important;
  font-size: 28px !important;
  font-family: 'Courier New', monospace;
  letter-spacing: 12px;
  text-align: center;
  padding: 14px 20px !important;
  border: 2px solid var(--border-dark) !important;
  border-radius: 8px;
  background-color: var(--white) !important;
  color: var(--primary) !important;
  font-weight: 700;
  margin: 0 auto;
}

.otp-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(40, 114, 161, 0.15);
}

.otp-input::placeholder {
  color: var(--text-muted);
  letter-spacing: 10px;
  opacity: 0.5;
}

.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.form-hint i {
  margin-right: 4px;
}

.otp-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.resend-text {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  transition: color var(--transition-fast);
}

.link-btn:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.link-btn:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

.link-btn i {
  margin-right: 4px;
}

/* Button loader */
.btn-loader {
  display: inline-block;
  margin-left: 8px;
}

/* OTP Timer */
#otpTimer,
#forgotOtpTimer {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: var(--primary);
}

#otpTimer.expiring,
#forgotOtpTimer.expiring {
  color: var(--danger);
}

.auth-switch {
  text-align: center;
  margin-top: 24px;
  color: var(--text-secondary);
}

.auth-switch a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Forgot Password */
.forgot-password-link {
  text-align: right;
  margin: 6px 0 0 0;
  font-size: 13px;
}

.forgot-password-link a {
  color: var(--primary);
  text-decoration: none;
}

.forgot-password-link a:hover {
  text-decoration: underline;
}

.forgot-description {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
  text-align: center;
  padding: 14px;
  background: var(--secondary-light);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.forgot-description i {
  color: var(--primary);
  margin-right: 8px;
}

.success-message {
  color: var(--success) !important;
  background: #F0FDF4 !important;
  border-left-color: var(--success) !important;
}

.success-message i {
  color: var(--success) !important;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  color: var(--text-inverse);
  padding: 80px 16px;
  text-align: center;
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(40, 114, 161, 0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding: 0 16px;
}

.hero-content h1 {
  font-size: clamp(28px, 6vw, 48px);
  margin-bottom: 16px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
}

.hero-content p {
  font-size: clamp(15px, 2.5vw, 18px);
  margin-bottom: 28px;
  opacity: 0.9;
  font-weight: 400;
  line-height: 1.6;
}

.hero .btn-primary {
  background: var(--white);
  color: var(--primary);
  font-size: 15px;
  padding: 14px 36px;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.hero .btn-primary:hover {
  background: var(--secondary-light);
  color: var(--primary-dark);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   CATEGORIES SECTION
   ============================================ */
.categories {
  padding: 56px 16px;
  background-color: var(--white);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: clamp(22px, 4vw, 32px);
  margin-bottom: 36px;
  text-align: center;
  color: var(--text-primary);
  font-weight: 700;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--primary);
  margin: 12px auto 0;
  border-radius: 2px;
}

.categories-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
}

/* ============================================
   CATEGORIES CAROUSEL
   ============================================ */
.categories-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 100%;
}

.categories-carousel {
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
  padding: 8px 0;
}

.categories-carousel::-webkit-scrollbar {
  display: none;
}

.categories-carousel-track {
  display: flex;
  flex-direction: row;
  gap: 40px;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 0 12px;
  min-width: min-content;
  width: max-content;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.carousel-arrow:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.carousel-arrow-left {
  left: -8px;
}

.carousel-arrow-right {
  right: -8px;
}

/* Skeleton inside carousel */
.carousel-skeleton {
  flex-shrink: 0;
}

/* ============================================
   STOCK LEFT BADGE
   ============================================ */
.stock-left-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  z-index: 1;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}

.category-card {
  text-align: center;
  padding: 0;
  margin: 0;
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--transition-normal);
}

.category-card:hover,
.category-card:focus,
.category-card:active,
.category-card:focus-visible {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  background: none !important;
}

.category-card:hover {
  transform: translateY(-4px);
}

.category-image {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 12px;
  border: 2px solid var(--secondary);
}

.category-card:hover .category-image {
  border-color: var(--primary);
}

.category-icon {
  font-size: 36px;
  color: var(--primary);
  margin-bottom: 12px;
  width: 72px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none !important;
  outline: none !important;
}

.category-card:hover .category-icon {
  color: var(--primary-dark);
}

.category-name {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 13px;
}

/* ============================================
   PRODUCTS GRID
   ============================================ */
.featured-products {
  padding: 56px 16px;
  background-color: var(--bg);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
  cursor: pointer;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.product-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background-color: var(--gray-100);
}

.product-image-wrapper {
  overflow: hidden;
  position: relative;
}

.product-info {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.4;
}

.product-card:hover .product-name {
  color: var(--primary);
}

.product-description {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.stars {
  color: var(--warning);
  font-size: 13px;
}

.review-count {
  color: var(--text-muted);
  font-size: 12px;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.current-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.original-price {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.discount {
  color: var(--success);
  font-weight: 600;
  font-size: 11px;
  background: #F0FDF4;
  padding: 3px 8px;
  border-radius: 4px;
}

.product-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.product-actions button {
  flex: 1;
  padding: 10px;
  font-size: 13px;
  white-space: nowrap;
  border-radius: 8px;
}

/* Out of Stock Badge & Card State */
.product-card.out-of-stock {
  opacity: 0.75;
}

.product-card.out-of-stock .product-image {
  filter: grayscale(40%);
}

.out-of-stock-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--danger);
  color: #fff;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  z-index: 2;
}

.product-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Product grid messages */
.no-products,
.error-message {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 16px;
  grid-column: 1 / -1;
}

.error-message {
  color: var(--danger);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--gray-900);
  color: var(--text-inverse);
  padding: 56px 16px 28px;
  border-top: 3px solid var(--primary);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 36px;
  margin-bottom: 36px;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.footer-section h4 {
  margin-bottom: 16px;
  color: var(--secondary);
  font-weight: 700;
  font-size: 15px;
}

.footer-section p,
.footer-section a:not(.social-links a):not(.footer-contact a) {
  color: var(--gray-400);
  text-decoration: none;
}

.footer-section a:not(.social-links a):not(.footer-contact a):hover {
  color: var(--secondary);
}

.footer-section a:not(.social-links a):not(.footer-contact a) {
  margin-bottom: 10px;
  display: block;
  font-size: 14px;
}

.footer-section ul {
  list-style: none;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.social-links a {
  display: flex;
  width: 40px;
  height: 40px;
  background: var(--gray-800);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  color: var(--gray-300);
  transition: background var(--transition-fast), color var(--transition-fast);
  border: 1px solid var(--gray-700);
  text-decoration: none !important;
}

.social-links a i {
  font-size: 16px;
  line-height: 1;
}

.social-links a:hover {
  background: var(--primary);
  color: var(--text-inverse);
  border-color: var(--primary);
}

/* Footer Contact */
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-400);
  text-decoration: none;
  font-size: 14px;
}

.footer-contact a:hover {
  color: var(--secondary);
}

.footer-contact a i {
  width: 16px;
  flex-shrink: 0;
  color: var(--primary-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 28px;
  border-top: 1px solid var(--gray-800);
  color: var(--gray-500);
  font-size: 14px;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   UTILITIES
   ============================================ */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.alert-success {
  background: #F0FDF4;
  color: var(--success);
  border: 1px solid #BBF7D0;
}

.alert-error {
  background: #FEF2F2;
  color: var(--danger);
  border: 1px solid #FECACA;
}

.alert-info {
  background: var(--secondary-light);
  color: var(--primary);
  border: 1px solid var(--secondary);
}

/* Spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

.loading-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-secondary);
}

.loading-state .spinner {
  width: 48px;
  height: 48px;
  border-width: 4px;
  margin: 0 auto 20px;
}

/* Order Status Badges */
.order-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.order-status.pending {
  background: #FEF3C7;
  color: var(--warning);
}

.order-status.processing {
  background: var(--secondary-light);
  color: var(--primary);
}

.order-status.shipped {
  background: #DBEAFE;
  color: #1D4ED8;
}

.order-status.delivered {
  background: #F0FDF4;
  color: var(--success);
}

.order-status.cancelled {
  background: #FEF2F2;
  color: var(--danger);
}

/* ============================================
   CONFIRM / ALERT MODAL
   ============================================ */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal);
}

.custom-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.custom-modal {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-xl);
}

.custom-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 24px;
}

.custom-modal-icon.warning { background: #FEF3C7; color: var(--warning); }
.custom-modal-icon.danger { background: #FEF2F2; color: var(--danger); }
.custom-modal-icon.success { background: #F0FDF4; color: var(--success); }
.custom-modal-icon.info { background: var(--secondary-light); color: var(--primary); }

.custom-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 10px;
}

.custom-modal-message {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.6;
}

.custom-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.custom-modal-actions button {
  min-width: 100px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.custom-modal-actions .btn-cancel {
  background: var(--gray-100);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.custom-modal-actions .btn-cancel:hover {
  background: var(--gray-200);
}

.custom-modal-actions .btn-confirm {
  background: var(--primary);
  color: var(--text-inverse);
  border: none;
}

.custom-modal-actions .btn-confirm:hover {
  background: var(--primary-dark);
}

.custom-modal-actions .btn-danger {
  background: var(--danger);
  color: var(--text-inverse);
  border: none;
}

.custom-modal-actions .btn-danger:hover {
  background: #B91C1C;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

@keyframes progressBar {
  from { width: 100%; }
  to { width: 0%; }
}

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  animation: toastSlideIn 0.3s ease;
  position: relative;
  overflow: hidden;
}

.toast-success { border-left: 4px solid var(--primary); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info { border-left: 4px solid var(--primary); }

.toast.toast-exiting {
  animation: toastSlideOut 0.25s ease forwards;
}

.toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}

.toast-content { flex: 1; min-width: 0; }

.toast-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.toast-message {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  word-wrap: break-word;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  border-radius: 4px;
}

.toast-close:hover {
  color: var(--text-primary);
  background: var(--gray-100);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 10px 10px;
  animation: progressBar 4s linear forwards;
}

.toast-success .toast-icon { background: var(--secondary-light); color: var(--primary); }
.toast-success .toast-progress { background: var(--primary); }
.toast-success .toast-title { color: var(--primary); }

.toast-error .toast-icon { background: #FEF2F2; color: var(--danger); }
.toast-error .toast-progress { background: var(--danger); }
.toast-error .toast-title { color: var(--danger); }

.toast-warning .toast-icon { background: #FEF3C7; color: var(--warning); }
.toast-warning .toast-progress { background: var(--warning); }
.toast-warning .toast-title { color: var(--warning); }

.toast-info .toast-icon { background: var(--secondary-light); color: var(--primary); }
.toast-info .toast-progress { background: var(--primary); }
.toast-info .toast-title { color: var(--primary); }

/* ============================================
   SKELETON LOADING
   ============================================ */
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

.skeleton-text { height: 16px; margin-bottom: 8px; border-radius: 4px; }
.skeleton-text.short { width: 60%; }
.skeleton-title { height: 24px; margin-bottom: 12px; }
.skeleton-image { aspect-ratio: 1; border-radius: 10px; }

.skeleton-card {
  background: var(--white);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
}

/* Skeleton Product Card */
.skeleton-product-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.skeleton-product-image { width: 100%; height: 200px; border-radius: 8px; margin-bottom: 16px; }
.skeleton-product-title { height: 20px; width: 80%; margin-bottom: 12px; }
.skeleton-product-price { height: 24px; width: 40%; margin-bottom: 12px; }
.skeleton-product-rating { height: 16px; width: 60%; margin-bottom: 16px; }
.skeleton-product-btn { height: 42px; width: 100%; border-radius: 8px; }

/* Skeleton Category Card */
.skeleton-category-card { background: transparent; text-align: center; width: 100px; flex-shrink: 0; }
.skeleton-category-icon { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 12px; }
.skeleton-category-name { height: 14px; width: 70px; margin: 0 auto; border-radius: 4px; }

/* Skeleton Cart */
.skeleton-cart-item { display: flex; gap: 20px; padding: 20px; background: var(--white); border-bottom: 1px solid var(--border); }
.skeleton-cart-image { width: 120px; height: 120px; border-radius: 10px; flex-shrink: 0; }
.skeleton-cart-details { flex: 1; }
.skeleton-cart-title { height: 22px; width: 70%; margin-bottom: 12px; }
.skeleton-cart-price { height: 20px; width: 30%; margin-bottom: 16px; }
.skeleton-cart-qty { height: 40px; width: 120px; border-radius: 8px; }

/* Skeleton Order */
.skeleton-order-card { background: var(--white); border-radius: 12px; padding: 20px; margin-bottom: 16px; border: 1px solid var(--border); }
.skeleton-order-header { display: flex; justify-content: space-between; margin-bottom: 16px; }
.skeleton-order-id { height: 20px; width: 160px; }
.skeleton-order-status { height: 28px; width: 100px; border-radius: 20px; }
.skeleton-order-items { display: flex; gap: 12px; margin-bottom: 16px; }
.skeleton-order-item-img { width: 60px; height: 60px; border-radius: 8px; }
.skeleton-order-total { height: 24px; width: 120px; margin-left: auto; }

/* Skeleton Profile */
.skeleton-profile-header { display: flex; gap: 24px; padding: 24px; background: var(--white); border-radius: 12px; margin-bottom: 24px; border: 1px solid var(--border); }
.skeleton-avatar { width: 100px; height: 100px; border-radius: 50%; }
.skeleton-profile-info { flex: 1; }
.skeleton-profile-name { height: 28px; width: 200px; margin-bottom: 12px; }
.skeleton-profile-email { height: 18px; width: 260px; }

/* Skeleton Wishlist */
.skeleton-wishlist-item { background: var(--white); border-radius: 12px; padding: 18px; border: 1px solid var(--border); }

/* Skeleton Product Detail */
.skeleton-product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 24px; background: var(--white); border-radius: 12px; border: 1px solid var(--border); }
.skeleton-detail-image { width: 100%; height: 400px; border-radius: 12px; }
.skeleton-detail-content { padding: 20px 0; }
.skeleton-detail-title { height: 32px; width: 80%; margin-bottom: 16px; }
.skeleton-detail-price { height: 36px; width: 30%; margin-bottom: 20px; }
.skeleton-detail-desc { height: 16px; width: 100%; margin-bottom: 10px; }
.skeleton-detail-btn { height: 48px; width: 200px; border-radius: 8px; margin-top: 24px; }

/* Skeleton Checkout */
.skeleton-checkout-form { background: var(--white); border-radius: 12px; padding: 24px; border: 1px solid var(--border); }
.skeleton-form-title { height: 24px; width: 150px; margin-bottom: 20px; }
.skeleton-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.skeleton-input { height: 48px; width: 100%; border-radius: 8px; }
.skeleton-input-full { height: 48px; width: 100%; border-radius: 8px; margin-bottom: 16px; }

/* Skeleton Summary */
.skeleton-summary { background: var(--white); border-radius: 12px; padding: 24px; border: 1px solid var(--border); }
.skeleton-summary-title { height: 24px; width: 120px; margin-bottom: 20px; }
.skeleton-summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; }
.skeleton-summary-label { height: 18px; width: 80px; }
.skeleton-summary-value { height: 18px; width: 60px; }
.skeleton-summary-total { height: 28px; width: 100px; }

/* Skeleton Grid */
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.skeleton-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.skeleton-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* Page Loading */
.page-loading {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.page-loading.hidden { display: none; }

.page-loading .spinner-lg {
  width: 56px;
  height: 56px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   FOCUS + ACCESSIBILITY
   ============================================ */
.btn-primary:focus,
.btn-secondary:focus,
.btn-outline:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(40, 114, 161, 0.25);
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  .navbar, .footer, .toast-container, .modal { display: none !important; }
  body { background: white; color: black; }
  .product-card, .order-card { break-inside: avoid; }
}
