/* 
ESTILOS BASE PARA PÁGINAS DE SISTEMA
*/
body.page-invoice, body.page-checkout, body.page-error {
  background-color: var(--systemMg-light);
  color: var(--systemMg-dark);
}

/* Clases de compatibilidad con Bootstrap */
.mg-mb-0 {
  margin-bottom: 0;
}
.mg-mb-3 {
  margin-bottom: 1rem;
}
.mg-mb-2 {
  margin-bottom: 0.5rem;
}

.mg-form-text {
  margin-top: 0.25rem;
  font-size: 0.875em;
  color: var(--systemMg-secondary);
  width: 100%;
}
.mg-form-check {
  min-height: 1.5rem;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  border-bottom-style: dashed;
  border-bottom-color: var(--systemMg-secondary);
  border-width: 1px;
  padding-bottom: 30px;
}
.mg-form-check-input {
  width: 1em;
  height: 1em;
  margin-top: 0.25em;
  vertical-align: top;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 1px solid rgba(0, 0, 0, 0.25);
  appearance: none;
  margin: 3px 10px 0 0;
}

.mg-form-check-input[type="radio"] {
  border-radius: 50%;
}

.mg-form-check-input:checked {
  background-color: var(--systemMg-primary);
  border-color: var(--systemMg-primary);
}

.mg-form-check-label {
  margin-bottom: 0;
}


.mg-form-text {
  margin-top: 0.25rem;
  font-size: 0.875em;
  color: var(--systemMg-secondary);
}


/* Estilos globales para páginas del sistema */
body {
  font-family: var(--systemMg-font);
  margin: 0;
  padding: 0;
  background-color: var(--systemMg-light);
}

h1, h2, h3 {
  margin: 10px 0;
}

/* Estilos para el footer con copyright */
.mg-system-footer {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  font-size: 14px;
  color: var(--systemMg-secondary);
  background-color: #f8f9fa;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.mg-system-footer small {
  display: block;
  margin-bottom: 5px;
}

.mg-system-footer img {
  height: 16px;
  width: auto;
  vertical-align: middle;
  margin: 0 2px;
}

.mg-system-footer a {
  color: var(--systemMg-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mg-system-footer a:hover {
  color: #004494;
}

.mG_invalid {
  border-color: var(--systemMg-danger);
}
.mG_invalid:focus {
  border-color: var(--systemMg-danger);
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Estilos modernos para páginas de error como 404 */
.mg-error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 85vh;
  font-family: var(--systemMg-font);
  background-color: var(--systemMg-light);
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
}

.mg-error-code {
  font-size: 120px;
  font-weight: 700;
  color: var(--systemMg-danger);
  margin: 0;
  line-height: 1;
}

.mg-error-title {
  font-size: 32px;
  font-weight: 600;
  color: var(--systemMg-dark);
  margin: 10px 0;
}

.mg-error-message {
  font-size: 18px;
  color: var(--systemMg-secondary);
  max-width: 500px;
  margin: 0 auto 30px;
  line-height: 1.5;
}

/* Botón para páginas de error, extiende mg-btn-primary */
.mg-error-button {
  /* Hereda propiedades base de mg-btn-primary */
  background-color: var(--systemMg-primary); 
  color: var(--systemMg-white);
  display: inline-block;
  text-decoration: none; 
  font-weight: 500; 
  transition: transform 0.2s ease;
  
  /* Personalizaciones específicas */
  padding: 12px 24px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 86, 179, 0.2);
}

.mg-error-button:hover {
  transform: translateY(-2px);
  color: var(--systemMg-white);
  background-color: var(--systemMg-dark);
  box-shadow: 0 6px 8px rgba(0, 86, 179, 0.25);
}

.mg-error-illustration {
  width: 100%;
  max-width: 300px;
  margin-bottom: 30px;
}

/* Estilos para contenedores dinámicos genéricos */
.mg-content-dynamic {
  font-family: var(--systemMg-font);
  padding: 2rem 0;
}

/* Estilos para scategories */
.mg-category-title {
  font-size: 2.5rem;
  margin: 0;
  text-align: center;
}

/* Estilos para secciones de checkout */
.mg-checkout-main {
  margin: 0 auto;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.mg-checkout-column {
  flex: 1;
  min-width: 280px;
}

.mg-checkout-data, 
.mg-checkout-pay {
  background-color: var(--systemMg-white);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.mg-payment-content {
  display: none;
}
.mg-payment-content figure {
  margin: 0;
}
.mg-payment-content figure img {
  max-width: 100%;
}

.mg-payment-content.active {
  display: block;
}

.mg-checkout-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--systemMg-primary);
  display: inline-block;
}

.mg-checkout-aside {
  position: sticky;
  top: 20px;
  background-color: var(--systemMg-white);
  border-radius: 8px;
  padding: 1.5rem;
  height: fit-content;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.mg-checkout-product {
  display: flex;
  align-items: center;
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.mg-checkout-product picture {
  position: relative;
  margin-right: 15px;
}

.mg-checkout-product picture img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.mg-checkout-product picture span {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--systemMg-primary);
  color: var(--systemMg-white);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
}

.mg-checkout-product section {
  display: flex;
  flex: 1;
  justify-content: space-between;
}

.mg-checkout-summary {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mg-checkout-summary li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #555;
}

.mg-checkout-summary li:last-child {
  font-weight: 700;
  font-size: 1.2em;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
  color: var(--systemMg-dark);
}

/* --------------------- */
/* Estilos para facturas */
/* --------------------- */
.mg-invoma-page {
  min-width: 210mm;
  padding: 24px;
}

.mg-invoma {
  position: relative;
  max-width: 250mm;
  min-width: 210mm;
  margin: 0 auto;
  padding: 40px 48px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: #333;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mg-invoma-status-bar {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  align-items: flex-start;
  justify-content: flex-end;
}

.mg-invoma a {
  color: inherit;
  text-decoration: none;
}

.mg-invoma-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 40px;
}

.mg-invoma-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mg-invoma-logo {
  height: 56px;
  max-width: 180px;
  object-fit: contain;
}

.mg-invoma-company {
  font-size: 0.9em;
  color: #333;
  line-height: 1.6;
}

.mg-invoma-company strong {
  font-size: 1.1em;
  color: var(--invoma-primary, var(--systemMg-primary));
  display: block;
  margin-bottom: 4px;
}

.mg-invoma-company p {
  margin: 2px 0;
}

.mg-invoma-doc {
  text-align: right;
  margin-top: 60px;
}

.mg-invoma-doc-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin: 25px 0 8px 0;
  color: var(--invoma-primary, var(--systemMg-primary));
}

.mg-invoma-doc-meta {
  font-size: 0.95em;
  color: #666;
}

.mg-invoma-doc-meta strong {
  color: var(--invoma-secondary, var(--systemMg-secondary));
}

.mg-invoma-client {
  margin-bottom: 36px;
}

.mg-invoma-block h4 {
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--invoma-secondary, var(--systemMg-secondary));
  margin: 0 0 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  padding-bottom: 6px;
}

.mg-invoma-block p {
  margin: 4px 0;
  line-height: 1.5;
  color: #333;
}

.mg-invoma-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
}

.mg-invoma-table thead th {
  background: var(--invoma-primary, var(--systemMg-primary));
  color: #fff;
  font-weight: 600;
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 12px;
  text-align: left;
}

.mg-invoma-table thead th:nth-child(3),
.mg-invoma-table thead th:nth-child(4),
.mg-invoma-table thead th:nth-child(5),
.mg-invoma-table thead th:nth-child(6) {
  text-align: right;
}

.mg-invoma-table tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid #e9ecef;
}

.mg-invoma-table tbody td:nth-child(3),
.mg-invoma-table tbody td:nth-child(4),
.mg-invoma-table tbody td:nth-child(5),
.mg-invoma-table tbody td:nth-child(6) {
  text-align: right;
}

.mg-invoma-table .mg-desc-cell {
  vertical-align: top;
}

.mg-invoma-table .mg-desc-cell strong {
  display: block;
  margin-bottom: 4px;
}

.mg-invoma-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.02);
}

.mg-invoma-totals {
  margin-top: 24px;
  text-align: right;
  max-width: 320px;
  margin-left: auto;
}

.mg-invoma-totals p {
  display: flex;
  justify-content: space-between;
  margin: 8px 0;
  padding: 4px 0;
}

.mg-invoma-totals .mg-grand {
  font-size: 1.25em;
  font-weight: 700;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid var(--invoma-primary, var(--systemMg-primary));
  color: var(--invoma-primary, var(--systemMg-primary));
}

.mg-invoma-notes {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #666;
  font-size: 0.9em;
}

.mg-invoma-notes h4 {
  font-size: 0.9em;
  color: var(--invoma-secondary, var(--systemMg-secondary));
  margin-bottom: 8px;
}

.mg-invoma-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85em;
  color: #888;
}

.mg-invoma-actions {
  display: ruby;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.mg-invoma-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--invoma-primary, var(--systemMg-primary));
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95em;
  cursor: pointer;
}

.mg-invoma-btn:hover {
  opacity: 0.9;
}

.mg-invoma-btn-secondary {
  background: #6c757d;
}

.mg-invoma-btn-pay {
  background: #2563eb !important;
  color: #fff !important;
}

.mg-invoma-btn-pay:hover {
  background: #1d4ed8 !important;
  opacity: 1;
}

.mg-invoma-badge {
  display: inline-block;
  padding: 6px 12px;
  border-bottom-left-radius: 4px;
  font-size: 0.85em;
  font-weight: 600;
}

.mg-invoma-badge-success {
  background: #22c55e;
  color: #fff;
}

@media print {

  .mg-invoma-page {
    padding: 0 !important;
    min-width: auto !important;
  }

  .mg-invoma {
    box-shadow: none !important;
    padding: 12px 16px !important;
    max-width: none !important;
    min-width: auto !important;
    margin: 0 !important;
    background: #fff !important;
    font-size: 10px !important;
  }

  .mg-invoma-header {
    gap: 12px !important;
    margin-bottom: 16px !important;
  }

  .mg-invoma-brand {
    gap: 8px !important;
  }

  .mg-invoma-logo {
    height: 36px !important;
    max-width: 120px !important;
  }

  .mg-invoma-company {
    font-size: 9px !important;
    line-height: 1.35 !important;
  }

  .mg-invoma-company strong {
    font-size: 10px !important;
    margin-bottom: 2px !important;
  }

  .mg-invoma-company p {
    margin: 1px 0 !important;
  }

  .mg-invoma-doc-title {
    font-size: 16px !important;
    margin: 0 0 4px 0 !important;
  }

  .mg-invoma-doc-meta {
    font-size: 9px !important;
  }

  .mg-invoma-client {
    margin-bottom: 12px !important;
  }

  .mg-invoma-block h4 {
    font-size: 8px !important;
    margin: 0 0 4px 0 !important;
    padding-bottom: 3px !important;
  }

  .mg-invoma-block p {
    margin: 2px 0 !important;
    line-height: 1.3 !important;
    font-size: 9px !important;
  }

  .mg-invoma-table {
    margin: 12px 0 !important;
    font-size: 9px !important;
  }

  .mg-invoma-table thead th {
    font-size: 7px !important;
    padding: 6px 8px !important;
  }

  .mg-invoma-table tbody td {
    padding: 6px 8px !important;
    font-size: 9px !important;
  }

  .mg-invoma-table .mg-desc-cell strong {
    margin-bottom: 2px !important;
    font-size: 9px !important;
  }

  .mg-invoma-table .mg-desc-cell span {
    font-size: 8px !important;
  }

  .mg-invoma-totals {
    margin-top: 12px !important;
    max-width: 240px !important;
    font-size: 9px !important;
  }

  .mg-invoma-totals p {
    margin: 4px 0 !important;
    padding: 2px 0 !important;
  }

  .mg-invoma-totals .mg-grand {
    font-size: 11px !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
  }

  .mg-invoma-notes {
    margin-top: 16px !important;
    padding-top: 12px !important;
    font-size: 8px !important;
  }

  .mg-invoma-notes h4 {
    font-size: 9px !important;
    margin-bottom: 4px !important;
  }

  .mg-invoma-footer {
    margin-top: 20px !important;
    padding-top: 12px !important;
    font-size: 8px !important;
  }

  .mg-invoma-status-bar {
    padding: 6px 10px !important;
  }

  .mg-invoma-badge {
    font-size: 7px !important;
    padding: 3px 6px !important;
  }

  .mg-invoma-btn,
  .mg-budget-action {
    display: none !important;
  }

  .mg-invoma-footer .mg-invoma-actions {
    display: none !important;
  }
}

.mg-container {
  max-width: 1200px;
  margin: 0 auto;
}

.mg-header {
  background-color: var(--systemMg-dark);
  color: white;
  padding: 20px;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}

.mg-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--systemMg-primary), var(--systemMg-info));
}

.mg-logo {
  height: 50px;
  margin-right: 20px;
}

.mg-company-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mg-details {
  margin-left: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
  text-align: center;
}

/* Título con degradado similar a páginas de error */
.mg-invoice-title {
  font-size: 32px;
  font-weight: 700;
  margin: 20px 0;
  color: var(--systemMg-primary);
  display: inline-block;
}

.mg-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 30px;
  background-color: var(--systemMg-white);
  border: none;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.mg-th {
  padding: 15px;
  text-align: left;
  background-color: #f8f9fa;
  color: var(--systemMg-dark);
  font-weight: 600;
  font-size: 0.85em;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid #e9ecef;
}

.mg-td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #f1f1f1;
  font-size: 0.95em;
}

.mg-table tbody tr:last-child .mg-td {
  border-bottom: none;
}

.mg-table tbody tr:nth-child(even) {
  background-color: #fcfcfc;
}

.mg-table tbody tr:hover {
  background-color: #f8f9fa;
}

.mg-receipt-info, 
.mg-payee-info {
  margin-bottom: 25px;
  padding-bottom: 15px;
}

.mg-receipt-info h3,
.mg-payee-info h3,
.mg-notes h3 {
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--systemMg-dark);
}

.mg-receipt-info p, 
.mg-payee-info p {
  margin: 8px 0;
  line-height: 1.6;
  color: #555;
  font-size: 0.95em;
}

.mg-receipt-info strong,
.mg-payee-info strong {
  font-weight: 600;
  color: var(--systemMg-dark);
}

.mg-totals {
  text-align: right;
  margin-top: 30px;
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.mg-totals p {
  margin: 8px 0;
  font-weight: 500;
  color: #555;
}

.mg-totals p:last-child {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--systemMg-dark);
  padding-top: 10px;
  border-top: 1px solid #e9ecef;
  margin-top: 10px;
}

.mg-notes {
  margin-top: 30px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--systemMg-info);
  font-size: 0.95em;
  line-height: 1.6;
  color: #555;
}

/* Estilos para blog */
.mg-blog-title-container, .mg-store-title-container {
  background-color: var(--systemMg-dark);
  color: white;
  padding: 40px 0;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.mg-article-container {
  padding: 2rem 0;
}

.mg-blog-title-container::after, .mg-store-title-container::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--systemMg-primary), var(--systemMg-info));
}
.mg-section-title {
  padding: 0 0px 20px;
}
.mg-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
  padding: 0 20px;
}

.mg-card-image {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.mg-img-link {
  display: block;
  width: 100%;
  height: 100%;
}

.mg-img-responsive {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mg-card-body {
  padding: 2rem;
}

.mg-card-category {
  margin-bottom: 1rem;
}

.mg-card-title {
  font-weight: 600;
  margin: 0 0 1rem 0;
  line-height: 1.4;
}

.mg-card-title a {
  color: var(--systemMg-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

.mg-card-title a:hover {
  color: var(--systemMg-primary);
}

.mg-card-meta {
  font-size: 0.85rem;
  color: var(--systemMg-secondary);
  margin-bottom: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mg-card-meta-updated {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--systemMg-info);
}

.mg-card-meta-updated::before {
  content: "•";
  color: var(--systemMg-secondary);
}

.mg-card-meta-updated time {
  color: inherit;
}

.mg-card-excerpt {
  color: #555;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.mg-card-excerpt p {
  margin: 0;
}

.mg-btn-text {
  display: inline-flex;
  align-items: center;
  color: var(--systemMg-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  position: relative;
}

.mg-btn-text:hover {
  color: var(--systemMg-dark);
  transform: translateX(4px);
}

.mg-btn-text::after {
  content: "\2192";
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.mg-btn-text:hover::after {
  transform: translateX(4px);
}

.mg-more-articles {
  padding: 0rem 3rem 3rem;
}
.mg-more-articles .mg-blog-grid {
  padding: 0 0px;
}

/* Estilos para artículo individual */
.mg-article {
  max-width: 900px;
  margin: 0 auto;
  background-color: var(--systemMg-white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.mg-article-header {
  padding: 3rem 3rem 1rem 3rem;
  background: linear-gradient(135deg, #f8f9fa 0%, var(--systemMg-white) 100%);
  border-bottom: 1px solid #f0f0f0;
}

.mg-article-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  line-height: 1.2;
  color: var(--systemMg-dark);
}

.mg-article-meta {
  font-size: 14px;
  color: var(--systemMg-secondary);
  margin-bottom: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mg-article-meta::before {
  content: "📅";
  font-size: 0.9rem;
}

.mg-article-meta-updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--systemMg-info);
}

.mg-article-meta-updated::before {
  content: "•";
  color: var(--systemMg-secondary);
}

.mg-article-meta-updated time {
  color: inherit;
}

.mg-article-category {
  margin-bottom: 0;
}

.mg-article-image {
  margin: 0;
  height: 400px;
  overflow: hidden;
}

.mg-article-image .mg-img-responsive {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mg-article-content {
  padding: 3rem;
  line-height: 1.8;
  color: var(--systemMg-dark);
}

.mg-article-content h1,
.mg-article-content h2,
.mg-article-content h3,
.mg-article-content h4,
.mg-article-content h5,
.mg-article-content h6 {
  color: var(--systemMg-dark);
  font-weight: 600;
  margin: 2rem 0 1rem 0;
}
.mg-article-content figure {
  margin: 0;
}
.mg-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.mg-article-content blockquote {
  border-left: 4px solid var(--systemMg-primary);
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background-color: #f8f9fa;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}
.mg-article-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2.5rem 0;
  background-color: var(--systemMg-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.mg-article-content table caption {
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--systemMg-secondary);
  text-align: left;
  background-color: #f8f9fa;
}
.mg-article-content table th,
.mg-article-content table td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--systemMg-dark);
}
.mg-article-content table thead th {
  background-color: #f8f9fa;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--systemMg-dark);
}
.mg-article-content table tbody tr:nth-child(even) {
  background-color: #fcfcfc;
}
.mg-article-content table tbody tr:hover {
  background-color: #f5f8ff;
}
.mg-article-content table tbody tr:last-child td {
  border-bottom: none;
}
.mg-article-content pre {
  display: block;
  margin-top: 0;
  margin-bottom: 1rem;
  overflow: auto;
  font-size: .875em;
  background: var(--systemMg-dark);
  color: var(--systemMg-color-gray-300);
  padding: 30px;
}

.mg-article-tags {
  margin: 0;
  padding: 2rem 3rem 3rem 3rem;
  border-top: 1px solid #f0f0f0;
  background-color: #fafafa;
}

.mg-article-tags strong {
  color: var(--systemMg-dark);
  font-weight: 600;
  margin-bottom: 1rem;
  display: block;
}

.mg-tag {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(45deg, #f8f9fa, #e9ecef);
  color: var(--systemMg-dark);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-right: 0.75rem;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.mg-tag:hover {
  background: linear-gradient(45deg, var(--systemMg-primary), var(--systemMg-info));
  color: var(--systemMg-white);
  transform: translateY(-2px);
}

/* Estilos para imagen de portada con caption */
.mg-image-caption {
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  font-size: 0.9rem;
  color: var(--systemMg-secondary);
  text-align: center;
  font-style: italic;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Estilos para galería de imágenes */
.mg-article-gallery {
  margin: 3rem 0;
  padding: 2rem 3rem;
  background: linear-gradient(135deg, #f8f9fa 0%, var(--systemMg-white) 100%);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.mg-gallery-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 2rem 0;
  text-align: center;
  color: var(--systemMg-dark);
}

.mg-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.mg-gallery-item {
  position: relative;
  background-color: var(--systemMg-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.mg-gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.mg-gallery-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mg-gallery-item:hover .mg-gallery-img {
  transform: scale(1.05);
}

.mg-gallery-caption {
  padding: 1rem;
  background-color: var(--systemMg-white);
  font-size: 0.9rem;
  color: var(--systemMg-secondary);
  text-align: center;
  line-height: 1.4;
  border-top: 1px solid #f0f0f0;
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { 
    opacity: 0;
    transform: scale(0.8);
  }
  to { 
    opacity: 1;
    transform: scale(1);
  }
}


/* ---------- */
/* Responsive */
/* ---------- */
@media (max-width: 768px) {
  .mg-error-code {
    font-size: 80px;
  }
  
  .mg-error-title {
    font-size: 24px;
  }
  
  .mg-error-message {
    font-size: 16px;
  }
  
  .mg-checkout-main {
    width: 100%;
  }

  .mg-company-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .mg-logo {
    margin-bottom: 10px;
  }

  .mg-table {
    font-size: 0.9em;
  }

  .mg-th, .mg-td {
    padding: 8px 6px;
  }

  /* Blog responsive */
  .mg-blog-title-container, .mg-store-title-container {
    padding: 30px 0;
    margin-bottom: 30px;
  }
  
  .mg-blog-title {
    font-size: 2rem;
  }
  
  .mg-blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 15px;
  }
  
  .mg-card-image {
    height: 180px;
  }
  
  .mg-card-body {
    padding: 1.5rem;
  }
  
  .mg-article {
    margin: 0 15px;
    border-radius: 12px;
  }
  
  .mg-article-header {
    padding: 2rem 1.5rem 1rem 1.5rem;
  }
  
  .mg-article-title {
    font-size: 2rem;
    line-height: 1.3;
  }
  
  .mg-article-image {
    height: 250px;
  }
  
  .mg-article-content {
    padding: 2rem 1.5rem;
    font-size: 1rem;
  }
  .mg-article-content table {
    display: block;
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: none;
  }
  .mg-article-content table caption {
    position: sticky;
    left: 0;
  }
  .mg-article-content table th,
  .mg-article-content table td {
    white-space: nowrap;
    padding: 0.85rem 1rem;
  }
  .mg-article-content table tbody tr:hover {
    background-color: #f8f9fa;
  }
  
  .mg-article-tags {
    padding: 1.5rem;
  }
  .mg-tag {
    padding: 6px 12px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .mg-more-articles {
    padding: 0rem 1.5rem 2rem;
  }
  
  /* Formularios responsive */
  .mg-form-container {
    padding: 1rem 0;
  }
  
  .mg-form {
    margin: 0 15px;
    padding: 1.5rem;
    border-radius: 8px;
  }
  
  .mg-form-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }
  
  .mg-field-title {
    font-size: 1.4rem;
    margin: 2rem 0 0.8rem 0;
  }
  
  .mg-field-header {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.6rem 0;
  }
  
  .mg-form-actions .mg-btn-primary {
    width: 100%;
    padding: 16px 24px;
    font-size: 1rem;
  }
  
  .mg-radio-group,
  .mg-checkbox-group {
    gap: 0.5rem;
  }
  
  .mg-radio-option,
  .mg-checkbox-option {
    padding: 10px 12px;
  }
  
  /* Galería responsive */
  .mg-article-gallery {
    margin: 2rem 0;
    padding: 1.5rem;
  }
  
  .mg-gallery-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
  }
  
  .mg-gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .mg-gallery-item {
    border-radius: 8px;
  }
  
  .mg-gallery-img {
    height: 180px;
  }
  
  .mg-gallery-caption {
    padding: 0.75rem;
    font-size: 0.85rem;
  }
  
} 

/* Estilos para tienda (store) - Clases mg-store-product-* */
/* Basados en main.css y variables --systemMg-* */

/* Contenedor principal vista producto */
.mg-store-product-container {
  padding: 120px 0;
}

.mg-store-product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* Galería */
.mg-store-product-gallery {
  position: sticky;
  top: 2rem;
}

.mg-store-product-main-image {
  position: relative;
  background-color: var(--systemMg-light);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  margin-bottom: 1rem;
}

.mg-store-product-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mg-store-product-zoom {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
}

.mg-store-product-zoom-icon {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--systemMg-primary);
  font-size: 1rem;
  box-shadow: var(--systemMg-box-shadow);
}

.mg-store-product-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--systemMg-color-gray-300);
  font-size: 4rem;
}

.mg-store-product-thumbnails {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mg-store-product-thumb {
  width: 70px;
  height: 70px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--systemMg-light);
  transition: border-color 0.2s ease;
}

.mg-store-product-thumb:hover,
.mg-store-product-thumb.active {
  border-color: var(--systemMg-primary);
}

.mg-store-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Info columna derecha */
.mg-store-product-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mg-store-product-availability {
  font-size: 0.9rem;
  font-weight: 600;
}

.mg-store-product-availability.in-stock {
  color: var(--systemMg-success);
}

.mg-store-product-availability.out-of-stock {
  color: var(--systemMg-danger);
}

.mg-store-product-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  color: var(--systemMg-dark);
}

.mg-store-product-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--systemMg-primary);
}

.mg-store-product-more-info {
  color: var(--systemMg-primary);
  text-decoration: none;
  font-weight: 500;
}

.mg-store-product-more-info:hover {
  text-decoration: underline;
}

/* Variantes */
.mg-store-product-variants {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mg-store-product-variant-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mg-store-product-variant-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--systemMg-dark);
}

.mg-store-product-variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mg-store-product-variant-option {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border: 2px solid var(--systemMg-color-gray-300);
  border-radius: var(--systemMg-border-radius);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.mg-store-product-variant-option:hover {
  border-color: var(--systemMg-primary);
}

.mg-store-product-variant-option input {
  margin-right: 0.5rem;
}

.mg-store-product-variant-option input:checked + span {
  font-weight: 600;
}

/* Acciones */
.mg-store-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.mg-store-product-btn-add,
.mg-store-product-btn-buy,
.mg-store-product-btn-quote {
  min-width: auto;
}

/* Compartir */
.mg-store-product-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--systemMg-color-gray-300);
}

.mg-store-product-share span {
  font-size: 0.9rem;
  color: var(--systemMg-secondary);
}

.mg-store-product-share a {
  color: var(--systemMg-secondary);
  font-size: 1.25rem;
}

.mg-store-product-share a:hover {
  color: var(--systemMg-primary);
}

/* Tabs */
.mg-store-product-tabs {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--systemMg-color-gray-300);
}

.mg-store-product-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 1.5rem 0;
  padding: 0;
  border-bottom: 2px solid var(--systemMg-color-gray-300);
}

.mg-store-product-tab {
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 500;
  color: var(--systemMg-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: var(--systemMg-font);
  transition: color 0.2s ease;
}

.mg-store-product-tab:hover {
  color: var(--systemMg-primary);
}

.mg-store-product-tab.active {
  color: var(--systemMg-primary);
  border-bottom-color: var(--systemMg-primary);
}

.mg-store-product-tab-content {
  display: none;
  padding: 1.5rem 0;
  line-height: 1.8;
  color: var(--systemMg-dark);
}

.mg-store-product-tab-content.active {
  display: block;
}

.mg-store-product-tab-content p {
  margin: 0 0 1rem 0;
}

.mg-store-product-tab-content figure {
  margin: 1rem 0;
}

.mg-store-product-tab-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.mg-store-product-tab-content h1,
.mg-store-product-tab-content h2,
.mg-store-product-tab-content h3,
.mg-store-product-tab-content h4,
.mg-store-product-tab-content h5,
.mg-store-product-tab-content h6 {
  margin: 1.5rem 0 0.75rem 0;
  color: var(--systemMg-dark);
}

/* Responsive */
@media (max-width: 992px) {
  .mg-store-product-layout {
    grid-template-columns: 1fr;
  }

  .mg-store-product-gallery {
    position: static;
  }
}

@media (max-width: 768px) {
  .mg-store-product-container {
    padding: 60px 0;
  }

  .mg-store-product-title {
    font-size: 1.5rem;
  }

  .mg-store-product-price {
    font-size: 1.5rem;
  }

  .mg-store-product-actions {
    flex-direction: column;
  }

  .mg-store-product-actions .mg-btn {
    width: 100%;
  }
}