/*
  GUERRERO - DESIGN SYSTEM
  Sistema de diseño para Chocolatería Guerrero
*/

/* ===== VARIABLES GLOBALES ===== */
:root {
  /* COLORES PRIMARIOS */
  --gt-primary: #511A16;        /* Marrón oscuro principal */
  --gt-primary-light: #7A3530;  /* Marrón medio */
  --gt-primary-dark: #3A1210;   /* Marrón muy oscuro */

  /* COLORES SECUNDARIOS */
  --gt-secondary: #D2691E;      /* Naranja Guatán */
  --gt-secondary-light: #E8803D;
  --gt-secondary-dark: #B8550C;

  /* COLORES FUNCIONALES */
  --gt-success: #059669;
  --gt-danger: #DC2626;
  --gt-warning: #F59E0B;
  --gt-info: #0EA5E9;

  /* GRISES */
  --gt-gray-50: #F9FAFB;
  --gt-gray-100: #F3F4F6;
  --gt-gray-200: #E5E7EB;
  --gt-gray-300: #D1D5DB;
  --gt-gray-500: #6B7280;
  --gt-gray-700: #374151;
  --gt-gray-900: #111827;

  /* TIPOGRAFÍA */
  --gt-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --gt-font-serif: 'Playfair Display', Georgia, serif;

  /* ESPACIADO */
  --gt-space-2: 0.5rem;
  --gt-space-3: 0.75rem;
  --gt-space-4: 1rem;
  --gt-space-6: 1.5rem;
  --gt-space-8: 2rem;

  /* RADIUS */
  --gt-radius: 8px;
  --gt-radius-lg: 12px;

  /* SOMBRAS */
  --gt-shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --gt-shadow: 0 4px 6px rgba(0,0,0,0.1);
  --gt-shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

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

body {
  font-family: var(--gt-font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--gt-gray-900);
  background: var(--gt-gray-50);
}

/* ===== LAYOUT BASE ===== */
.gt-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.gt-page {
  min-height: 100vh;
  padding-top: 75px; /* Espacio para navbar fijo */
}

/* ===== NAVBAR ===== */
.gt-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 75px;
  background: var(--gt-primary);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  box-shadow: 0 4px 12px rgba(81, 26, 22, 0.3);
}

.gt-navbar-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: white;
  font-weight: 700;
  font-size: 1.375rem;
  font-family: var(--gt-font-serif);
  letter-spacing: 0.5px;
  padding: 0.5rem 1.25rem;
  border-radius: var(--gt-radius);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.1);
}

.gt-navbar-brand:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.gt-navbar-brand img {
  height: 45px;
  filter: brightness(0) invert(1);
}

.gt-navbar-nav {
  display: flex;
  list-style: none;
  gap: 0.375rem;
  margin-left: auto;
  align-items: center;
}

.gt-nav-link {
  padding: 0.625rem 1rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  border-radius: var(--gt-radius);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  font-size: 0.9375rem;
  white-space: nowrap;
  border: 1px solid transparent;
}

.gt-nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.gt-nav-link.active {
  background: var(--gt-secondary);
  color: white;
  box-shadow: 0 2px 8px rgba(210, 105, 30, 0.4);
  border-color: var(--gt-secondary-dark);
}

/* Botón de logout */
.gt-nav-logout {
  padding: 0.5rem 1.125rem;
  background: rgba(220, 38, 38, 0.15);
  color: #FCA5A5;
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: var(--gt-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.gt-nav-logout:hover {
  background: rgba(220, 38, 38, 0.3);
  color: white;
  border-color: rgba(220, 38, 38, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

/* ===== CARDS ===== */
.gt-card {
  background: white;
  border-radius: var(--gt-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--gt-shadow);
  margin-bottom: 1.5rem;
}

.gt-card-header {
  border-bottom: 1px solid var(--gt-gray-200);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.gt-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gt-primary);
}

/* ===== BOTONES ===== */
.gt-btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: var(--gt-radius);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}

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

.gt-btn-primary:hover {
  background: var(--gt-primary-dark);
}

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

.gt-btn-secondary:hover {
  background: var(--gt-secondary-dark);
}

.gt-btn-success {
  background: var(--gt-success);
  color: white;
}

.gt-btn-danger {
  background: var(--gt-danger);
  color: white;
}

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

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

.gt-btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.gt-btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1.125rem;
}

/* ===== FORMULARIOS ===== */
.gt-form-group {
  margin-bottom: 1.25rem;
}

.gt-label {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 500;
  color: var(--gt-gray-700);
  font-size: 0.9rem;
}

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

.gt-input:focus,
.gt-select:focus,
.gt-textarea:focus {
  outline: none;
  border-color: var(--gt-primary);
}

.gt-textarea {
  min-height: 100px;
  resize: vertical;
}

.gt-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* ===== TABLAS ===== */
.gt-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--gt-radius);
  overflow: hidden;
}

.gt-table thead {
  background: var(--gt-gray-100);
}

.gt-table th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--gt-gray-700);
  font-size: 0.9rem;
}

.gt-table td {
  padding: 0.875rem 1rem;
  border-top: 1px solid var(--gt-gray-200);
}

.gt-table tr:hover {
  background: var(--gt-gray-50);
}

.gt-table-striped tbody tr:nth-child(even) {
  background: var(--gt-gray-50);
}

/* Productos sin stock */
.gt-table tr.sin-stock {
  opacity: 0.5;
  background: var(--gt-gray-100);
}

.gt-table tr.sin-stock td {
  color: var(--gt-gray-500);
}

/* ===== BADGES ===== */
.gt-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.gt-badge-success {
  background: #ECFDF5;
  color: var(--gt-success);
}

.gt-badge-danger {
  background: #FEF2F2;
  color: var(--gt-danger);
}

.gt-badge-warning {
  background: #FFFBEB;
  color: var(--gt-warning);
}

.gt-badge-info {
  background: #F0F9FF;
  color: var(--gt-info);
}

/* ===== ALERTAS ===== */
.gt-alert {
  padding: 1rem 1.25rem;
  border-radius: var(--gt-radius);
  margin-bottom: 1rem;
}

.gt-alert-success {
  background: #ECFDF5;
  color: var(--gt-success);
  border: 1px solid var(--gt-success);
}

.gt-alert-danger {
  background: #FEF2F2;
  color: var(--gt-danger);
  border: 1px solid var(--gt-danger);
}

.gt-alert-warning {
  background: #FFFBEB;
  color: var(--gt-warning);
  border: 1px solid var(--gt-warning);
}

.gt-alert-info {
  background: #F0F9FF;
  color: var(--gt-info);
  border: 1px solid var(--gt-info);
}

/* ===== UTILIDADES ===== */
.gt-text-center { text-align: center; }
.gt-text-right { text-align: right; }
.gt-text-sm { font-size: 0.875rem; }
.gt-text-lg { font-size: 1.125rem; }
.gt-text-xl { font-size: 1.25rem; }
.gt-text-2xl { font-size: 1.5rem; }
.gt-text-3xl { font-size: 1.875rem; }

.gt-font-bold { font-weight: 700; }
.gt-font-semibold { font-weight: 600; }

.gt-mt-2 { margin-top: 0.5rem; }
.gt-mt-4 { margin-top: 1rem; }
.gt-mb-2 { margin-bottom: 0.5rem; }
.gt-mb-4 { margin-bottom: 1rem; }
.gt-mb-6 { margin-bottom: 1.5rem; }
.gt-mb-8 { margin-bottom: 2rem; }

.gt-flex { display: flex; }
.gt-flex-between { display: flex; justify-content: space-between; }
.gt-flex-center { display: flex; align-items: center; }
.gt-gap-2 { gap: 0.5rem; }
.gt-gap-4 { gap: 1rem; }

.gt-grid {
  display: grid;
  gap: 1rem;
}

.gt-grid-2 { grid-template-columns: repeat(2, 1fr); }
.gt-grid-3 { grid-template-columns: repeat(3, 1fr); }
.gt-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== DASHBOARD METRICS ===== */
.gt-metric {
  background: white;
  padding: 1.5rem;
  border-radius: var(--gt-radius-lg);
  box-shadow: var(--gt-shadow);
}

.gt-metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gt-primary);
  margin-bottom: 0.25rem;
}

.gt-metric-label {
  font-size: 0.875rem;
  color: var(--gt-gray-600);
  font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .gt-navbar-nav {
    display: none;
  }

  .gt-grid-2,
  .gt-grid-3,
  .gt-grid-4 {
    grid-template-columns: 1fr;
  }

  .gt-form-row {
    grid-template-columns: 1fr;
  }
}

/* ===== POS ESPECÍFICO ===== */
.gt-pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.gt-product-card {
  background: white;
  border: 2px solid var(--gt-gray-200);
  border-radius: var(--gt-radius);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.gt-product-card:hover {
  border-color: var(--gt-primary);
  transform: translateY(-2px);
  box-shadow: var(--gt-shadow);
}

.gt-product-card.sin-stock {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--gt-gray-100);
}

.gt-product-card.sin-stock:hover {
  transform: none;
  border-color: var(--gt-gray-200);
}

.gt-product-name {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gt-primary);
}

.gt-product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gt-secondary);
}

.gt-product-stock {
  font-size: 0.875rem;
  color: var(--gt-gray-600);
  margin-top: 0.25rem;
}
