/* ========================================
   MODERN GLASSMORPHISM & DESIGN SYSTEM
   ======================================== */

:root {
  /* Modern Color Palette */
  --primary: #FF6A00;
  --primary-dark: #d65800;
  --primary-light: #ff8533;
  --secondary: #0a73f5;
  --secondary-dark: #0847b3;
  --secondary-light: #4285f4;
  --accent: #28a745;
  --accent-dark: #1e7e34;
  --accent-light: #20c997;
  --danger: #dc3545;
  --warning: #ffc107;
  --success: #10b981;
  --info: #17a2b8;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-bg-light: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-blur: 20px;

  /* Backgrounds */
  --bg: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --surface: #ffffff;
  --surface-secondary: #f8f9fa;

  /* Text Colors */
  --text: #212529;
  --text-secondary: #495057;
  --text-muted: #6c757d;
  --text-inverse: #ffffff;

  /* Border & Shadow */
  --border: #e9ecef;
  --border-light: #f8f9fa;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #FF6A00 0%, #ff8533 50%, #ffb366 100%);
  --gradient-secondary: linear-gradient(135deg, #0a73f5 0%, #4285f4 50%, #8ab4f8 100%);
  --gradient-text: linear-gradient(135deg, #FF6A00 0%, #ff8533 100%);

  /* Border Radius */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:focus { outline: 2px solid var(--secondary); outline-offset: 2px; }

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  filter: brightness(1.1);
}

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

.btn-outline-primary:hover {
  background: var(--primary);
  color: white;
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ========================================
   FORMS
   ======================================== */

.form-control,
.form-select {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  transition: var(--transition-fast);
  background-color: white;
  color: var(--text);
  font-family: inherit;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.1);
  outline: none;
}

.form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  display: block;
}

.input-group {
  display: flex;
  gap: 0.5rem;
}

.input-group-text {
  background: var(--surface-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--text-muted);
}

/* ========================================
   CARDS
   ======================================== */

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-body {
  padding: 1.5rem;
}

/* Glass Effect */
.glass {
  background: var(--glass-bg-light);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

/* ========================================
   NAVBAR
   ======================================== */

.navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  font-weight: 500;
  color: var(--text-secondary) !important;
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary) !important;
}

.nav-link.active {
  color: var(--primary) !important;
  border-bottom: 2px solid var(--primary);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  background: var(--gradient-text);
  background: linear-gradient(135deg, #FF6A00 0%, #ffb366 100%);
  color: white;
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
  animation: float 20s infinite ease-in-out;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* ========================================
   PRODUCTS GRID - ENHANCED LAYOUT
   ======================================== */

.products-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 1.5rem !important;
  margin-top: 2rem !important;
}

.product-card-wrapper {
  height: 100%;
}

.product-card {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-slow);
  background: white;
  box-shadow: var(--shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.product-image-container {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #f8f9fa;
}

.product-image-container img.card-img-top,
.product-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-image-container img {
  transform: scale(1.08);
}

.product-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-badge.new {
  background: var(--primary);
  color: white;
}

.product-badge.sale {
  background: var(--danger);
  color: white;
}

.product-actions-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  transition: var(--transition);
}

.product-card:hover .product-actions-overlay {
  opacity: 1;
}

.action-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: var(--shadow);
}

.action-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.product-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category {
  font-size: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.product-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.product-title a {
  color: var(--text);
  text-decoration: none;
  transition: var(--transition-fast);
}

.product-title a:hover {
  color: var(--primary);
}

.product-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.product-rating .fa-star {
  font-size: 0.75rem;
}

.rating-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.product-price-row {
  margin-bottom: 1rem;
}

.price {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.current-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.old-price {
  font-size: 0.9375rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-actions-row {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
}

.product-actions-row .btn {
  flex: 1;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .product-card-body {
    padding: 1rem;
  }

  .product-title {
    font-size: 0.9375rem;
  }

  .current-price {
    font-size: 1.125rem;
  }

  .action-btn {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

.product-card {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-slow);
  background: white;
  box-shadow: var(--shadow);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--danger);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.75rem;
  font-weight: 600;
}

.product-actions {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  transition: var(--transition);
}

.product-card:hover .product-actions {
  opacity: 1;
}

.product-actions .btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  padding: 0;
}

/* ========================================
   ALERTS
   ======================================== */

.alert {
  border: none;
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  font-weight: 500;
  animation: slideInDown 0.3s ease-out;
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
}

.alert-info {
  background: #cffafe;
  color: #164e63;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(20px) rotate(10deg);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(255, 106, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 106, 0, 0.6);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.hover-lift {
  transition: var(--transition);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hover-scale {
  transition: var(--transition-fast);
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .hero {
    padding: 3rem 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }

  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 1rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .card-body {
    padding: 1rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

.text-primary {
  color: var(--primary) !important;
}

.text-secondary {
  color: var(--secondary) !important;
}

.d-flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 1rem;
}

.gap-4 {
  gap: 1.5rem;
}

.w-100 {
  width: 100%;
}

.h-100 {
  height: 100%;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }

.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.cursor-pointer { cursor: pointer; }
.user-select-none { user-select: none; }
