/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* General */
html, body {
  height: 100%;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Contenedor principal */
main {
  flex: 1;
}

/* Encabezado personalizado */
.main-header {
  background-color: white;
  color: #000;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 5px solid #e74c3c;
  border-radius: 0;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-left img {
  height: 60px;
  margin-right: 15px;
}

.header-left h1 {
  font-size: 28px;
  margin: 0;
}

/* Banner deslizante */
.slider-banner {
  background-color: #000;
  padding: 10px;
  font-weight: bold;
  color: #fff;
}

/* Tarjetas de producto */
.product-card {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-card img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Botones */
button, .btn {
  background-color: #e74c3c;
  color: white;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}

button:hover, .btn:hover {
  background-color: #146c43;
}

/* Pie de página */
.footer {
  background-color: #1b1b1b; /* Cambia este color si quieres un fondo diferente */
  color: #fff;
  padding: 20px;
  font-size: 14px;
  width: 100%;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.footer-left {
  flex: 1;
  min-width: 300px;
}

.footer-right {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  min-width: 200px;
}

/* Íconos sociales */
.footer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.footer-icon {
  width: 32px;
  height: 32px;
  filter: grayscale(100%);
  transition: all 0.3s ease;
}

.footer-social a:hover .footer-icon {
  filter: grayscale(0%);
  transform: scale(1.2);
}

/* Mensajes */
.alert {
  margin-bottom: 1rem;
}

.titulo-bienvenida {
  font-size: 3rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #212529;
}

.bienvenida-secundaria {
  text-align: center;
  margin-top: 20px;
}

.bienvenida-secundaria p {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #555;
}

.botones-acceso {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.botones-acceso .btn {
  font-size: 1rem;
  padding: 10px 20px;
  background-color: #dc3545;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

.botones-acceso .btn:hover {
  background-color: #bb2d3b;
}

.slider-banner {
  background-color: #000;
  padding: 10px;
  font-weight: bold;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.scroll-text {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-left 25s linear infinite;
}

.slider-banner:hover .scroll-text {
  animation-play-state: paused;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Roles y mensajes */
.distributor-badge {
  background-color: #e0f5e6;
  color: #0b6b2c;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.logout-link {
  color: #d9534f;
  font-weight: bold;
}

.messages-container {
  max-width: 1000px;
  margin: 20px auto;
  padding: 0 20px;
}

.message {
  padding: 10px 15px;
  margin-bottom: 10px;
  border-radius: 8px;
}

.message.success {
  background-color: #d4edda;
  color: #155724;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
}

.message.warning {
  background-color: #fff3cd;
  color: #856404;
}

#linea-decorativa {
  width: 100%;
  height: 10px;
  margin: 0;
  background: linear-gradient(to right, #e74c3c, #000000);
  z-index: 10;
  position: relative;
}

@keyframes moverLinea {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 0%;
  }
}


/* Colores del menú de categorías */
ul.categorias-menu li a.dropdown-item {
  color: #000 !important;
  background-color: white !important;
}

.categorias-menu .dropdown-item.categoria-link:hover {
  color: #e74c3c !important; /* rojo al pasar el cursor */
  background-color: #f8f9fa !important; /* fondo más claro opcional */
}

/* Submenú */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -1px;
  display: none;
  background-color: white;
}

.dropdown-submenu:hover > .dropdown-menu {
  display: block;
}

ul.categorias-menu li a.dropdown-item.categoria-link {
  color: #000 !important;
}

.carrito-header {
  background: #b3b3b3;
  border-radius: 0.5em;
  margin-top: 10px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px #bbb5;
}

.carrito-title {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 1px;
}

/* --- DISEÑO PARA LAS LISTAS DE PRODUCTOS POR MARCA --- */
/*.productos-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto 50px auto;
}*/

.productos-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto 50px auto;
}

/*.producto {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.11);
    overflow: hidden;
    text-align: center;
    padding: 24px 16px 32px 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: none;
}*/

.producto:hover { 
  transform: translateY(-7px) scale(1.025); 
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.producto img.img-producto {
  width: 100%;
  max-width: 185px;
  aspect-ratio: 1/1;
  object-fit: contain;
  display: block;
  margin: 0 auto 12px auto;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  background: #fff;
  padding: 8px;
}

.producto h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin: 6px 0 8px 0;
  color: #222;
}

.precio-producto {
  font-size: 1.45em;
  color: #e74c3c;
  font-weight: 900;
  margin-bottom: 8px;
  margin-top: 3px;
}

.btn-carrito {
  background-color: #000;
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: 9px;
  margin-top: 10px;
  cursor: pointer;
  font-size: 1.04em;
  transition: background-color 0.18s;
  font-weight: bold;
  box-shadow: none;
  outline: none;
}

.btn-carrito:hover {
  background-color: #222;
}

@media (max-width: 900px) {
  .productos-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .productos-container {
    grid-template-columns: 1fr;
  }
}

/* --- FIX SUPERIOR PARA BOTÓN DEL CARRITO --- */
form button.btn-carrito,
.btn-carrito,
button.btn-carrito {
  background: #000 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 9px !important;
  padding: 11px 22px !important;
  font-size: 1.04em !important;
  font-weight: bold !important;
  margin-top: 10px !important;
  box-shadow: none !important;
  outline: none !important;
  cursor: pointer !important;
  transition: background 0.18s !important;
  display: inline-block !important;
}
form button.btn-carrito:hover,
.btn-carrito:hover {
  background: #222 !important;
}

/* === Mostrar dropdown y dropend al pasar el cursor === */
.navbar-nav .dropdown:hover > .dropdown-menu,
.navbar-nav .dropend:hover > .dropdown-menu {
  display: block !important;
  visibility: visible;
  opacity: 1;
}

/* === Ajuste para alinear submenú lateral (dropend) === */
.navbar-nav .dropend .dropdown-menu {
  margin-top: 0 !important;
}
.badge-pendiente {
  background: #ffd1e1 !important; color: #a00;
}
.badge-verificando {
  background: #fff5c2 !important; color: #b19600;
}
.badge-aprobado {
  background: #d3f8df !important; color: #29915b;
}
.badge-despachado, .badge-entregado {
  background: #e9ecef !important; color: #444;
}
.badge-rechazado {
  background: #ffff !important; color: #e23131;
}

/* ==== FOOTER 29.COM (encapsulado) ==== */
#footer-29 { background:#111; color:#eee; border-top:1px solid #222; }
#footer-29 a{ color:#fff; }

#footer-29 .footer-inner{
  max-width:1200px;
  margin:0 auto;
  padding:12px 16px 0;
  text-align:center;
}

#footer-29 .footer-columns{
  display:grid;
  grid-template-columns:1fr auto 1fr; /* izq | logo | der */
  gap:28px;
  align-items:start;
  justify-items:center;
  margin-bottom:6px;
}

#footer-29 h6{
  margin:0 0 10px;
  font-weight:800;
  font-size:15px;
  letter-spacing:.3px;
  color:#fff;
}

#footer-29 .footer-policies ul,
#footer-29 .footer-company ul{
  list-style:none;
  padding:0;
  margin:0;
  text-align:center;
}
#footer-29 .footer-policies li,
#footer-29 .footer-company li{ margin:6px 0; }
#footer-29 .footer-policies a,
#footer-29 .footer-company a{
  color:#dfe3e6;
  text-decoration:none;
  font-size:14px;
}
#footer-29 .footer-policies a:hover,
#footer-29 .footer-company a:hover{ text-decoration:underline; }

#footer-29 .footer-brand{ margin:0; }
#footer-29 .footer-logo{
  width:340px;
  max-width:84vw;
  height:auto;
  display:inline-block;
  transform:translateY(-22px);
}

#footer-29 .footer-social{
  display:flex;
  justify-content:center;
  gap:10px;
  margin:44px 0 2px;
}
#footer-29 .footer-social img{ width:28px; height:auto; display:block; }

#footer-29 .footer-legal{
  font-size:13.5px;
  line-height:1.35;
  margin:0;
  padding-bottom:0;
  color:#d8d8d8;
}
#footer-29 .footer-legal p{ margin:0; }
#footer-29 .footer-legal a{ color:#fff; text-decoration:underline; }

@media (max-width:900px){
  #footer-29 .footer-columns{
    grid-template-columns:1fr;
    gap:12px;
  }
  #footer-29 .footer-branding{ order:1; }
  #footer-29 .footer-policies{ order:2; }
  #footer-29 .footer-company{ order:3; }
  #footer-29 .footer-logo{ width:260px; transform:translateY(-14px); }
  #footer-29 .footer-social img{ width:26px; }
  #footer-29 .footer-legal{ font-size:13px; line-height:1.4; }
}

/* --- Guardas fuertes para la franja gris del menú --- */
nav.main-menu .container-fluid,
nav.main-menu .navbar-collapse,
nav.main-menu .navbar-nav { background:#545454 !important; }

@media (min-width: 992px){
  nav.main-menu .navbar-collapse{ display:flex !important; }
}

nav.main-menu .navbar-nav{
  margin:0 !important;
  padding:0 !important;
  align-items:center !important;
  gap:16px !important;
}

nav.main-menu a{ margin:0 !important; text-decoration:none !important; }
nav.main-menu .nav-link,
nav.main-menu .dropdown-toggle{
  display:flex !important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  color:#fff !important;
  line-height:1.15;
  padding:6px 10px;
}

