/* En móviles, el mensaje informativo debe ocupar toda la fila, no agruparse con productos */
@media (max-width: 576px) {
  .row.g-4 > .col-12.mb-4:has(.catalogo-text-panel) {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    display: block;
    margin-bottom: 0.75rem !important;
  }
}
/* Catálogo: panel de texto descriptivo */
.catalogo-text-panel {
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(0, 176, 155, 0.1) 0%, rgba(150, 201, 61, 0.1) 100%);
  border-radius: 12px;
  border-left: 4px solid #00b09b;
}

.catalogo-text {
  margin: 0;
  color: #e0e0e0;
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
}

/* Vista móvil: hacer el panel y texto más pequeños */
@media (max-width: 576px) {
  .catalogo-text-panel {
    padding: 0.75rem;
    border-radius: 8px;
    border-left-width: 3px;
  }

  .catalogo-text {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  /* También reducir el margen inferior del contenedor de la columna si existe */
  .row .col-12.mb-4:has(.catalogo-text-panel) {
    margin-bottom: 0.75rem !important;
  }
}

/* ========================================
   VARIABLES CSS - Colores y configuración
   ======================================== */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-card: #ffffff;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --accent: #ffffff;
  --border: #2a2a2a;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* ========================================
   NAVBAR - Barra de navegación
   ======================================== */
.navbar {
  background-color: var(--bg-primary) !important;
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  z-index: 1000;
}

.navbar-toggler {
  border: 1px solid var(--border);
  padding: 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
  border-color: var(--accent);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-link-custom {
  color: var(--text-primary) !important;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  padding: 0.5rem 1.25rem !important;
  position: relative;
  transition: all 0.3s ease;
}

.nav-link-custom::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 2px;
  background-color: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-link-custom:hover::after,
.nav-link-custom.active::after {
  transform: scaleX(1);
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color 0.3s ease;
  text-decoration: none;
}

.icon-btn:hover {
  color: var(--text-secondary);
}

.cart-badge {
  position: absolute;
  top: -5px;
  right: -8px;
  background-color: var(--accent);
  color: var(--bg-primary);
  font-size: 0.7rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
}

/* ========================================
   DROPDOWN MENU - Menú desplegable usuario
   ======================================== */
.dropdown-dark {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
}

.dropdown-dark .dropdown-item {
  color: var(--text-primary);
  transition: background-color 0.2s ease;
}

.dropdown-dark .dropdown-item:hover {
  background-color: var(--bg-primary);
}

.dropdown-divider {
  border-color: var(--border);
}

/* ========================================
   PANELES LATERALES - Carrito y Mi Cuenta
   ======================================== */
.carrito-panel,
.cuenta-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background-color: var(--bg-card);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
  transition: right 0.3s ease;
  z-index: 1050;
  display: flex;
  flex-direction: column;
}

.carrito-panel.active,
.cuenta-panel.active {
  right: 0;
}

.carrito-header,
.cuenta-header {
  padding: 20px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-card);
}

.carrito-header h5,
.cuenta-header h5 {
  margin: 0;
  color: var(--bg-primary);
  font-weight: 700;
}

.btn-close-carrito,
.btn-close-cuenta {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--bg-primary);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
}

.carrito-body,
.cuenta-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  color: var(--bg-primary);
}

/* ========================================
   ITEMS DEL CARRITO
   ======================================== */
.carrito-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #ddd;
}

.carrito-item-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

.carrito-item-info {
  flex: 1;
}

.carrito-item-name {
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--bg-primary);
}

.carrito-item-price {
  color: #666;
  margin-bottom: 10px;
}

.carrito-item-cantidad {
  display: flex;
  align-items: center;
  gap: 10px;
}

.carrito-item-subtotal {
  margin-top: 8px;
  font-weight: 600;
  color: var(--bg-primary);
  font-size: 0.95rem;
}

.carrito-item-notas {
  margin-top: 10px;
}

.carrito-item-notas textarea {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 0.85rem;
  resize: vertical;
  transition: border-color 0.2s;
}

.carrito-item-notas textarea:focus {
  border-color: var(--bg-primary);
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(157, 78, 221, 0.25);
}

.btn-cantidad {
  background-color: var(--bg-primary);
  color: white;
  border: none;
  width: 25px;
  height: 25px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-cantidad:hover {
  background-color: var(--bg-secondary);
}

.btn-eliminar {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-eliminar:hover {
  background-color: #c82333;
}

.carrito-footer {
  padding: 20px;
  border-top: 1px solid #ddd;
  background-color: var(--bg-card);
}

.carrito-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--bg-primary);
}

/* ========================================
   SECCIONES DE MI CUENTA
   ======================================== */
.cuenta-section {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #ddd;
}

.cuenta-section:last-child {
  border-bottom: none;
}

.cuenta-section h6 {
  color: var(--bg-primary);
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cuenta-section p {
  margin-bottom: 5px;
  font-size: 0.95rem;
}

.panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  display: none;
}

.panel-overlay.active {
  display: block;
}

/* ========================================
   HERO CAROUSEL - Carrusel principal
   ======================================== */
.hero-carousel {
  margin-top: 70px;
  height: 600px;
  overflow: hidden;
  background-color: var(--bg-secondary);
}

.hero-carousel .carousel-item {
  height: 600px;
  /* Let Bootstrap handle show/hide/positioning of carousel items. */
  position: relative;
}

.hero-carousel .carousel-item .carousel-img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  filter: brightness(0.7);
  max-height: 600px;
  display: block;
}

.carousel-caption {
  bottom: 40px;
  left: auto;
  right: 40px;
  text-align: right;
}

.btn-comprar {
  background-color: var(--accent);
  color: var(--bg-primary);
  padding: 12px 40px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  display: inline-block;
  border: 2px solid var(--accent);
}

.btn-comprar:hover {
  background-color: transparent;
  color: var(--accent);
}

/* ========================================
   SECCIONES - Productos, catálogos, info
   ======================================== */
.productos-section,
.catalogo-section {
  padding: 80px 0;
}

.info-section {
  padding: 120px 0 60px;
}

.section-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 40px;
  letter-spacing: 1px;
}

.info-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 30px;
  letter-spacing: 1px;
}

.info-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ========================================
   TARJETAS DE PRODUCTOS
   ======================================== */
.product-card {
  background-color: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.product-inactive {
  opacity: 0.6;
  pointer-events: none;
}

.product-inactive:hover {
  transform: none;
  box-shadow: none;
}

.product-card {
  display: flex;
  flex-direction: column;
}

.product-image {
  width: 100%;
  height: auto; /* let the image keep its natural aspect ratio */
  max-height: 320px; /* limit the height so cards stay compact */
  object-fit: contain; /* ensures the whole image is visible */
  display: block;
  margin: 0 auto;
}

/* On very small screens reduce max height so image fits cards better */
@media (max-width: 576px) {
  .product-image {
    max-height: 220px;
  }
}

.product-info {
  padding: 20px;
  color: var(--bg-primary);
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.product-description {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.product-stock {
  font-size: 0.85rem;
  margin-bottom: 15px;
}

.stock-disponible {
  color: #28a745;
}

.stock-agotado {
  color: #dc3545;
}

.btn-add-cart {
  width: 100%;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border: none;
  padding: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-add-cart:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-add-cart:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* ========================================
   FILTROS Y CATEGORÍAS
   ======================================== */
.filtros-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 40px;
}

.categoria-tabs {
  flex: 1;
}

.categoria-tabs .nav-link {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  margin-right: 10px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.categoria-tabs .nav-link:hover,
.categoria-tabs .nav-link.active {
  background-color: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.filtros-adicionales {
  display: flex;
  gap: 10px;
}

.form-select-dark {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 15px;
  border-radius: 8px;
}

.form-select-dark:focus {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--accent);
  box-shadow: none;
}

/* ========================================
   FOOTER - Pie de página
   ======================================== */
.footer {
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-divider {
  border-color: var(--border);
  margin: 30px 0;
}

.footer-copyright {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* ========================================
   LOGIN PAGE - Página de inicio de sesión
   ======================================== */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background-color: var(--bg-card);
  padding: 50px;
  border-radius: 12px;
  max-width: 450px;
  width: 100%;
  color: var(--bg-primary);
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  color: #e0e0e0;
}

.login-subtitle {
  color: #666;
  margin-bottom: 30px;
}

.form-control-dark {
  background-color: #e0e0e0;
  border: 1px solid var(--border);
  color: #0a0a0a;
  padding: 12px;
}

.form-control-dark::placeholder {
  color: var(--text-secondary);
  opacity: 1;
}

.form-control-dark:focus {
  background-color: var(--bg-secondary);
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: none;
}

.form-label {
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 8px;
}

.form-check-label {
  color: var(--text-primary);
}

.btn-primary-custom {
  background-color: var(--bg-primary);
  border: none;
  padding: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  color: var(--text-primary);
}

.btn-primary-custom:hover {
  background-color: var(--bg-secondary);
}

/* Botón con gradiente */
.btn-gradient {
  background: linear-gradient(to right, #00b09b, #96c93d, #e7c6e0ff);
  border: none;
  color: white;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 9px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 176, 155, 0.3);
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 176, 155, 0.4);
  opacity: 0.95;
}

.btn-gradient:active {
  transform: translateY(0);
}

/* ========================================
   MODAL - Ventanas modales de Login/Signup
   ======================================== */
.login-modal-content {
  background-color: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.login-modal-content .modal-header {
  border-bottom: none;
  padding: 1rem 1rem 0 1rem;
}

.login-modal-content .btn-close {
  filter: invert(1);
}

/* ========================================
   MODAL - Ventanas modales generales
   ======================================== */
.modal-dark {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.modal-dark .modal-header {
  border-bottom: 1px solid var(--border);
}

.modal-dark .form-control-dark {
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.modal-dark .form-control-dark:focus {
  background-color: var(--bg-primary);
  border-color: var(--accent);
  color: var(--text-primary);
}

/* ========================================
   PANEL DE CONTROL - Administración
   ======================================== */
.sidebar {
  width: 260px;
  background-color: var(--bg-secondary);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 30px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header h4 {
  margin: 0;
  font-weight: 700;
}

.sidebar-menu {
  list-style: none;
  padding: 20px 0;
  flex: 1;
  overflow-y: auto;
}

.sidebar-item {
  margin-bottom: 5px;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.sidebar-item a i {
  font-size: 1.2rem;
  margin-right: 12px;
  width: 24px;
}

.sidebar-item a:hover,
.sidebar-item.active a {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
}

.main-content {
  margin-left: 260px;
  padding: 40px;
  min-height: 100vh;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

/* ========================================
   TARJETAS DE ESTADÍSTICAS
   ======================================== */
.stat-card {
  background-color: var(--bg-secondary);
  border-radius: 12px;
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-icon.bg-primary {
  background-color: #007bff;
}

.stat-icon.bg-success {
  background-color: #28a745;
}

.stat-icon.bg-warning {
  background-color: #ffc107;
}

.stat-icon.bg-info {
  background-color: #17a2b8;
}

.stat-info h3 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
}

.stat-info p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.admin-card {
  background-color: var(--bg-secondary);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
}

.table-dark {
  background-color: transparent;
}

.table-dark thead th {
  border-bottom: 2px solid var(--border);
  font-weight: 600;
}

.table-dark tbody tr {
  border-bottom: 1px solid var(--border);
}

.stat-card-small {
  background-color: var(--bg-primary);
  padding: 20px;
  border-radius: 8px;
}

.stat-card-small h4 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-card-small p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ========================================
   RESPONSIVE - Adaptación a móviles
   ======================================== */
@media (max-width: 768px) {
  /* Tipografía general más pequeña en móvil */
  body {
    font-size: 0.60rem;
    line-height: 1.1;
  }

  /* Navbar colapsado en móvil */
  .navbar-collapse {
    background-color: var(--bg-primary);
    padding: 1rem 0;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
  }

  .nav-link-custom {
    padding: 0.75rem 0 !important;
    font-size: 0.60rem;
  }

  .nav-link-custom::after {
    left: 0;
    right: auto;
    width: 40px;
  }

  /* Carrusel responsive - Altura dinámica ajustada por JavaScript */
  .hero-carousel {
    margin-top: 80px;
    height: auto; /* JS establecerá la altura */
    min-height: 250px; /* Mínimo para evitar colapso antes de JS */
    background-color: var(--bg-primary);
    overflow: hidden;
  }
  
  .hero-carousel .carousel-item {
    height: 100%;
    position: relative;
  }

  .hero-carousel .carousel-item img,
  .hero-carousel .carousel-item .carousel-img {
    height: 100%;
    width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    filter: brightness(0.8);
  }
  
  .carousel-caption {
    bottom: -10px;
    left: auto;
    right: 10px;
    text-align: right;
  }
  
  .btn-comprar {
    padding: 1.5px 4px;
    font-size: 0.35rem;
    letter-spacing: 0.1px;
  }

  /* Tarjetas de productos - 2 por fila en móvil */
  .product-card {
    margin-bottom: 1rem;
  }

  .product-image {
    height: auto;
    max-height: 150px;
    object-fit: contain;
  }

  .product-info {
    padding: 9px;
    padding-bottom: 5px;
  }

  .product-name {
    font-size: 0.7rem;
    margin-bottom: 5px;
  }

  .product-description {
    font-size: 0.60rem;
    margin-bottom: 5px;
  }

  .product-price {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }

  .product-stock {
    font-size: 0.65rem;
    margin-bottom: 8px;
  }

  /* Detalles de categoría y patrón en tarjetas */
  .product-details {
    font-size: 0.55rem;
    margin-bottom: 5px;
  }

  .detail-item.categoria,
  .detail-item.patron {
    font-size: 0.55rem;
  }

  .btn-add-cart {
    padding: 7px;
    font-size: 0.6rem;
    margin-bottom: 0;
  }

  /* Paneles laterales en móvil */
  .carrito-panel,
  .cuenta-panel {
    width: 100%;
    right: -100%;
  }

  .carrito-header h5,
  .cuenta-header h5 {
    font-size: 1rem;
  }

  .carrito-item-name {
    font-size: 0.75rem;
  }

  .carrito-item-price {
    font-size: 0.7rem;
  }

  .carrito-item-subtotal {
    font-size: 0.75rem;
  }

  .carrito-total {
    font-size: 0.9rem;
  }

  /* Secciones */
  .productos-section,
  .catalogo-section {
    padding: 10px 0 10px;
  }

  .info-section {
    padding: 80px 0 10px;
  }

  .section-title {
    font-size: 1.15rem;
    margin-bottom: 20px;
  }

  .info-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
  }

  .info-text {
    font-size: 0.75rem;
    line-height: 1.5;
  }

  /* Filtros */
  .filtros-container {
    flex-direction: column;
    align-items: stretch;
  }

  .categoria-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .categoria-tabs .nav-link {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.7rem;
    padding: 0.4rem 0.6rem;
  }

  /* Panel de control */
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }

  .main-content {
    margin-left: 0;
    padding: 20px;
  }

  /* Login */
  .login-card {
    padding: 30px;
  }

  .login-title {
    font-size: 1.15rem;
  }

  .login-subtitle {
    font-size: 0.75rem;
  }

  .form-label {
    font-size: 0.75rem;
  }

  .form-control-dark {
    font-size: 0.75rem;
    padding: 8px;
  }

  /* Footer */
  .footer {
    padding: 40px 0 20px;
    margin-top: 10px;
  }

  .footer-title {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }

  .footer-text {
    font-size: 0.7rem;
  }

  .footer-links {
    font-size: 0.7rem;
  }

  .footer-links li {
    margin-bottom: 8px;
  }

  .footer-copyright {
    font-size: 0.65rem;
  }
}

/* Grid responsive para productos */
@media (max-width: 576px) {
  .row.g-4 > [class*="col-"] {
    width: 50% !important;
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .row.g-4 > [class*="col-"] {
    width: 50% !important;
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* ========================================
   ESTILOS PARA MÓDULO DE PEDIDOS
   ======================================== */

/* Modal overlay y contenido */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  overflow-y: auto;
}

.modal-content {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-content.modal-large {
  max-width: 900px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Formularios admin */
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

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

.form-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.form-group small {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Sección de detalles de pedido */
.detalles-section {
  margin-top: 1.5rem;
}

.detalles-section .admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.detalles-section h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.2rem;
}

#detalles-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detalle-row {
  position: relative;
}

.detalle-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  position: relative;
}

/* Botón de remover detalle */
.detalle-remove {
  position: absolute !important;
  top: 10px;
  right: 10px;
  background-color: #dc3545 !important;
  border: none !important;
  color: white !important;
  padding: 0.35rem 0.6rem !important;
  border-radius: 4px;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  font-size: 0.875rem;
  gap: 0.25rem;
}

.detalle-remove:hover {
  background-color: #c82333 !important;
}

/* Botones personalizados y de Bootstrap */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-warning,
.btn-info,
.btn.btn-primary-custom,
.btn.btn-secondary,
.btn.btn-danger,
.btn.btn-warning,
.btn.btn-info {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary,
.btn.btn-primary-custom {
  background-color: var(--accent) !important;
  color: var(--bg-primary) !important;
  border-color: var(--accent) !important;
}

.btn-primary:hover,
.btn.btn-primary-custom:hover {
  opacity: 0.9 !important;
  background-color: #e0e0e0 !important;
}

.btn-secondary,
.btn.btn-secondary {
  background-color: #6c757d !important;
  color: white !important;
  border-color: #6c757d !important;
}

.btn-secondary:hover,
.btn.btn-secondary:hover {
  background-color: #5a6268 !important;
}

.btn-danger,
.btn.btn-danger {
  background-color: #dc3545 !important;
  color: white !important;
  border-color: #dc3545 !important;
}

.btn-danger:hover,
.btn.btn-danger:hover {
  background-color: #c82333 !important;
}

.btn-warning,
.btn.btn-warning {
  background-color: #ffc107 !important;
  color: var(--bg-primary) !important;
  border-color: #ffc107 !important;
}

.btn-warning:hover,
.btn.btn-warning:hover {
  background-color: #e0a800 !important;
}

.btn-info,
.btn.btn-info {
  background-color: #17a2b8 !important;
  color: white !important;
  border-color: #17a2b8 !important;
}

.btn-info:hover,
.btn.btn-info:hover {
  background-color: #138496 !important;
}

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

.btn-icon {
  padding: 0.5rem !important;
  width: 36px;
  height: 36px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* Acciones en tabla - asegurar espacio */
.admin-table .actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  white-space: nowrap;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
}

.badge-success {
  background-color: #28a745;
}

.badge-warning {
  background-color: #ffc107;
  color: var(--bg-primary);
}

.badge-danger {
  background-color: #dc3545;
}

.badge-info {
  background-color: #17a2b8;
}

.badge-secondary {
  background-color: #6c757d;
}

/* Tabla de admin */
.table-responsive {
  overflow-x: auto;
  margin-top: 1rem;
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-secondary);
  margin-bottom: 1rem;
}

.admin-table thead {
  background-color: var(--bg-primary);
}

.admin-table th,
.admin-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

.admin-table th {
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.admin-table tbody tr {
  transition: background-color 0.2s;
}

.admin-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.admin-table .actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  white-space: nowrap;
}

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

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

.text-danger {
  color: #dc3545 !important;
}

.text-success {
  color: #28a745 !important;
}

/* Info grid para vista de detalles */
.pedido-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.info-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-group label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-group span,
.info-group p {
  color: var(--text-primary);
  font-size: 1rem;
  margin: 0;
}

.font-weight-bold {
  font-weight: 600;
}

.mt-3 {
  margin-top: 1rem;
}

/* Admin section header */
.admin-section {
  padding: 1rem;
  background-color: var(--bg-secondary);
  border-radius: 8px;
}

.admin-section .admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-section h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .modal-content {
    max-width: 95%;
    max-height: 95vh;
  }

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

  .pedido-info-grid {
    grid-template-columns: 1fr;
  }

  .admin-table {
    font-size: 0.85rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.75rem 0.5rem;
  }
}

/* ========================================
   ESTILOS PARA PUNTOS DE ENTREGA
   ======================================== */
.puntos-entrega-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.punto-card {
  background-color: var(--bg-card);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.punto-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border-color: #333;
}

.punto-card h4 {
  color: #000;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.punto-card h4 i {
  color: #000;
  font-size: 1.1rem;
}

.punto-card p {
  color: #333;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.punto-card p i {
  color: #666;
  margin-right: 0.5rem;
  width: 16px;
}

.punto-card p:last-child {
  margin-bottom: 0;
}

/* Estilos para las opciones de entrega */
.delivery-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.delivery-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.delivery-option:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
}

.delivery-option input[type="radio"] {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.delivery-option label {
  cursor: pointer;
  margin: 0;
  flex: 1;
}

.delivery-option-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.delivery-option-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

.delivery-option-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Botón info de puntos */
.btn-info-puntos {
  background-color: transparent;
  border: 1px solid var(--accent);
  color: var(--text-primary);
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-info-puntos:hover {
  background-color: var(--accent);
  color: var(--bg-primary);
}

.btn-info-puntos i {
  font-size: 0.9rem;
}

/* Ajustes responsive para puntos de entrega */
@media (max-width: 768px) {
  .puntos-entrega-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .punto-card {
    padding: 1.25rem;
  }
  
  .delivery-option {
    padding: 0.85rem;
  }
}
