/* ==========================================================================
   Estilos Generales - Frigorífico Mundocarnes
   Diseño Full Width (Pantalla Completa en PC), Grid 3/6 y Notificaciones Top
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --mc-red: #dc3545;
  --mc-red-dark: #b02a37;
  --mc-red-light: #fff5f5;
  --mc-dark: #1a1a1a;
  --mc-dark-soft: #334155;
  --mc-border-card: #e2e8f0;
  --mc-radius-sm: 8px;
  --mc-radius-md: 14px;
  --mc-radius-lg: 20px;
  --mc-radius-pill: 50px;
  --mc-shadow-float: 0 10px 25px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: #ffffff;
  width: 100%;
}

body {
  background-color: #ffffff !important;
  background-image: none !important;
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0 0 90px 0;
  overflow-x: hidden;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--mc-dark);
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   ESTRUCTURA INTEGRADA DE ANCHO COMPLETO (FULL WIDTH 100%)
   ========================================================================== */
.container-fluid {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
}

.panel-base {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 16px 0;
  width: 100% !important;
  max-width: 100% !important;
}

.combos-container {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

.login-container {
  max-width: 480px;
  margin: 40px auto 0 auto;
  background: #ffffff !important;
  border: 1px solid var(--mc-border-card) !important;
  border-radius: var(--mc-radius-lg) !important;
  padding: 32px 24px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06) !important;
}

.logo-header {
  width: 100%;
  max-width: 230px;
  display: block;
  margin: 10px auto 14px auto;
  transition: transform 0.2s ease;
}

.logo-header:hover {
  transform: scale(1.02);
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   BARRA SUPERIOR DE ACCESOS DIRECTOS (STICKY PILLS)
   ========================================================================== */
.nav-categorias-sticky {
  position: sticky;
  top: 12px;
  z-index: 1020;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 14px;
  border-radius: var(--mc-radius-pill);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 10px;
  margin-bottom: 24px;
  width: 100%;
  scrollbar-width: none;
}

.nav-categorias-sticky::-webkit-scrollbar {
  display: none;
}

.btn-nav-categoria {
  flex: 0 0 auto;
  border: none;
  border-radius: var(--mc-radius-pill);
  background-color: #f1f5f9;
  color: #475569;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 20px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-nav-categoria:hover, .btn-nav-categoria:focus {
  background-color: var(--mc-red);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ==========================================================================
   TÍTULOS DE CADA SECCIÓN CONTINUA
   ========================================================================== */
.seccion-categoria {
  margin-bottom: 36px;
  scroll-margin-top: 80px;
  width: 100%;
}

.titulo-seccion-categoria {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--mc-dark);
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.titulo-seccion-categoria::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 20px;
  background-color: var(--mc-red);
  border-radius: 4px;
}

/* ==========================================================================
   TARJETAS DE PRODUCTO (3 COLUMNAS EN MÓVIL / 6 COLUMNAS EN PC)
   ========================================================================== */
.card {
  border: 1px solid var(--mc-border-card) !important;
  border-radius: var(--mc-radius-md) !important;
  background: #ffffff !important;
  padding: 10px !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  border-color: rgba(220, 53, 69, 0.35) !important;
}

.card-img-top {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: var(--mc-radius-sm);
  object-fit: contain;
  cursor: pointer;
  background-color: #ffffff;
  transition: transform 0.25s ease;
}

.card:hover .card-img-top {
  transform: scale(1.02);
}

.card h6 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--mc-dark);
  margin-top: 8px;
  margin-bottom: 2px;
  line-height: 1.2;
}

.card p.text-success {
  font-size: 1rem;
  font-weight: 800 !important;
  color: var(--mc-red) !important;
  margin-bottom: 2px;
}

.card small.text-muted {
  font-size: 0.72rem !important;
  color: #64748b !important;
  font-weight: 600;
}

.card .btn-outline-dark {
  border: 1.5px solid var(--mc-dark);
  border-radius: var(--mc-radius-pill);
  font-size: 0.76rem;
  padding: 5px 8px;
  font-weight: 700;
}

.card .btn-outline-dark:hover {
  background-color: var(--mc-dark);
  color: #ffffff;
}

.card .btn-warning, .card .btn-secondary {
  border-radius: var(--mc-radius-pill);
  font-size: 0.74rem;
  padding: 5px 8px;
  font-weight: 700;
}

.card .badge {
  border-radius: 6px;
  font-size: 0.7rem;
  padding: 4px 7px;
  font-weight: 700;
}

.img-agotado {
  opacity: 0.35;
  filter: grayscale(100%);
}

/* ==========================================================================
   BOTÓN "VER PEDIDO" FLOTANTE PERMANENTE
   ========================================================================== */
.btn-floating-pedido {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1040;
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  color: #1a1a1a !important;
  border: 2px solid #ffffff;
  border-radius: var(--mc-radius-pill);
  padding: 12px 24px;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: var(--mc-shadow-float);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-floating-pedido:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 28px rgba(255, 152, 0, 0.45);
  color: #000000 !important;
}

.badge-contador-carrito {
  background-color: #dc3545;
  color: #ffffff;
  border-radius: var(--mc-radius-pill);
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* ==========================================================================
   TOASTS DE NOTIFICACIÓN ENCABEZADO (ALTO CONTRASTE Y VISIBILIDAD)
   ========================================================================== */
.toast-container {
  z-index: 3000 !important;
}

.toast {
  background-color: #1e293b !important;
  color: #ffffff !important;
  border-radius: var(--mc-radius-pill) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  padding: 4px 14px;
}

.toast .toast-body {
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.2px;
}

/* ==========================================================================
   TABLA DE RESUMEN Y VISTA "TU PEDIDO"
   ========================================================================== */
#vistaPedido {
  max-width: 900px;
  margin: 0 auto;
}

.table td {
  padding: 10px 8px;
  vertical-align: middle;
  border-color: #f1f5f9;
}

/* ==========================================================================
   MODALES Y CONTROLES
   ========================================================================== */
.modal-content {
  border-radius: var(--mc-radius-md) !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18) !important;
  overflow: hidden;
}

.modal-header {
  padding: 14px 20px;
}

.modal-header.bg-dark {
  background: #1e293b !important;
}

.modal-header.bg-danger {
  background: var(--mc-red) !important;
}

.modal-header.bg-warning {
  background: #ffc107 !important;
}

.form-control, .form-select {
  border-radius: var(--mc-radius-sm);
  border: 1.5px solid #cbd5e1;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--mc-red);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

/* ==========================================================================
   OVERLAY DE ZOOM DE IMAGEN
   ========================================================================== */
#overlayImagenGrande {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 15, 15, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

#overlayImagenGrande.show {
  display: flex !important;
}

.contenedor-zoom {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90%;
  max-height: 85%;
}

#imagenGrandePopUp {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--mc-radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.3);
  object-fit: contain;
}

#btnCerrarZoom {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 2.2rem;
  line-height: 1;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2001;
  cursor: pointer;
}

#btnCerrarZoom:hover {
  background: var(--mc-red);
}

#btnSeleccionarZoom {
  border-radius: var(--mc-radius-pill);
}

/* ==========================================================================
   ADAPTACIONES RESPONSIVAS (MÓVIL EN 3 COLUMNAS / PC EN 6 COLUMNAS)
   ========================================================================== */
@media (max-width: 576px) {
  .container-fluid {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .logo-header {
    max-width: 170px;
  }

  .card {
    padding: 5px !important;
  }

  .card-img-top {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
  }

  .card h6 {
    font-size: 0.68rem;
    margin-top: 4px;
  }

  .card p.text-success {
    font-size: 0.78rem;
  }

  .card small.text-muted {
    font-size: 0.6rem !important;
  }

  .card .btn-outline-dark, .card .btn-warning, .card .btn-secondary {
    font-size: 0.62rem;
    padding: 3px 4px;
  }

  .btn-floating-pedido {
    bottom: 16px;
    right: 16px;
    padding: 10px 18px;
    font-size: 0.85rem;
  }
}

@media (min-width: 1200px) {
  .card-img-top {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
  }
}
