/* AhorraPar - Estilos Principales */

:root {
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --blue-50: #eff6ff;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #ffffff;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--slate-700);
  background: linear-gradient(to bottom right, var(--emerald-50), var(--white), var(--blue-50));
  min-height: 100vh;
}

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

/* Header */
header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--slate-200);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  color: var(--emerald-600);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(to right, var(--emerald-600), var(--blue-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav a {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--slate-700);
  border-radius: 0.5rem;
  transition: all 0.2s;
}

nav a:hover {
  background: var(--slate-100);
}

.btn {
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--emerald-600);
  color: white;
}

.btn-primary:hover {
  background: var(--emerald-700);
}

.btn-secondary {
  background: var(--blue-600);
  color: white;
}

.btn-secondary:hover {
  background: var(--blue-700);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--slate-300);
  color: var(--slate-700);
}

.btn-outline:hover {
  background: var(--slate-100);
}

/* Hero Section */
.hero {
  padding: 6rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 1.5rem;
}

.hero .highlight {
  background: linear-gradient(to right, var(--emerald-600), var(--blue-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--slate-600);
  max-width: 700px;
  margin: 0 auto 2rem;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 4rem 0;
  border-top: 1px solid var(--slate-200);
  border-bottom: 1px solid var(--slate-200);
}

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

.stat-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--emerald-600);
}

.stat-label {
  color: var(--slate-600);
  font-size: 1.125rem;
}

/* Promotions Grid */
.promotions-section {
  padding: 4rem 0;
}

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

.promotions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.promotion-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.promotion-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.promotion-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.promotion-content {
  padding: 1.5rem;
}

.promotion-company {
  font-size: 0.875rem;
  color: var(--slate-500);
  margin-bottom: 0.5rem;
}

.promotion-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--slate-900);
  margin-bottom: 0.5rem;
}

.promotion-description {
  color: var(--slate-600);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.promotion-prices {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.price-original {
  text-decoration: line-through;
  color: var(--slate-400);
  font-size: 1rem;
}

.price-special {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--emerald-600);
}

.discount-badge {
  background: var(--emerald-100);
  color: var(--emerald-700);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Footer */
footer {
  background: var(--slate-900);
  color: var(--slate-300);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--slate-300);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: var(--emerald-400);
}

.social-icons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  background: var(--slate-800);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-300);
  text-decoration: none;
  transition: all 0.2s;
}

.social-icon:hover {
  background: var(--emerald-600);
  color: white;
}

.footer-bottom {
  border-top: 1px solid var(--slate-800);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Card */
.card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--slate-700);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--slate-300);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--emerald-500);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Dashboard */
.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: white;
  border-right: 1px solid var(--slate-200);
  padding: 2rem 0;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 0.5rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--slate-700);
  text-decoration: none;
  transition: all 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--emerald-50);
  color: var(--emerald-700);
  border-right: 3px solid var(--emerald-600);
}

.dashboard-content {
  flex: 1;
  padding: 2rem;
}

.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-size: 2rem;
  color: var(--slate-900);
  margin-bottom: 0.5rem;
}

/* Table */
.table-container {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--slate-50);
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--slate-700);
  border-bottom: 1px solid var(--slate-200);
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--slate-100);
}

tr:hover {
  background: var(--slate-50);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.badge-success {
  background: var(--emerald-100);
  color: var(--emerald-700);
}

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

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

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  nav {
    display: none;
  }
  
  .promotions-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--slate-200);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}
