/* ===== VARIABLES ===== */
:root {
  --green-dark:   #1a4731;
  --green-main:   #2d7a4f;
  --green-light:  #a8e063;
  --green-pale:   #e8f5e4;
  --text-dark:    #1b2a1d;
  --text-body:    #3a4d3c;
  --text-muted:   #7a9480;
  --off-white:    #f7faf7;
  --transition:   0.3s ease;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: #e8f5e4 !important;
  color: var(--text-body);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}


/* ===== HERO ===== */
#hero-banner {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../imagenes/fondo.png") center/cover no-repeat;
  opacity: 0.4;
  z-index: 0;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1;
}

.banner-particles {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.particle {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green-light);
  opacity: 0.3;
  animation: floatParticle var(--dur, 3s) linear infinite;
  
}

@keyframes floatParticle {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-40px) scale(1.4);
    opacity: 0.6;
  }
}

/* ICONO OJO */
.toggle-password {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}

.toggle-password:hover {
  color: var(--green-main);
}

/* ===== TARJETA ===== */
.banner-content {
  position: relative;
  z-index: 3;
  background: rgba(228, 248, 215, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

/* ===== LOGO ===== */
.banner-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

/* ===== TEXTO ===== */
.banner-title {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.banner-title span {
  color: var(--green-light);
}

.banner-slogan {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ===== FORMULARIO ===== */
.formulario {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* INPUTS */
.input-custom {
  border-radius: 999px !important;
  padding: 0.85rem 1rem !important;
  border: 1px solid rgba(0,0,0,0.15) !important;
  font-family: 'DM Sans', sans-serif;
  transition: var(--transition);
}

.input-custom:focus {
  border-color: var(--green-main) !important;
  box-shadow: 0 0 0 2px rgba(45,122,79,0.2) !important;
}

/* BOTÓN */
.btn-primary {
  background: var(--green-light) !important;
  color: var(--green-dark) !important;
  border: none !important;
  border-radius: 999px !important;
  font-weight: 600;
  padding: 0.85rem;
  transition: var(--transition);
}

.btn-primary:hover {
  background: #c5f07a !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(168,224,99,0.35);
}

/* LINK */
.form-link {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-link a {
  color: var(--green-main);
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  
}

.nav-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.50rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--white);
  background: rgba(168,224,99,0.15);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(26,71,49,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(168,224,99,0.15);
  transition: var(--transition);
}

.navbar-nav .nav-link {
  color: rgba(255,255,255,0.7) !important;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 20px;
  transition: 0.3s;
}

.navbar-nav .nav-link:hover {
  color: white !important;
  background: rgba(168,224,99,0.15);
}

.navbar-nav .nav-link.active {
  color: white !important;
  background: rgba(168,224,99,0.15);
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* NAVBAR BASE */
.navbar-custom {
  background: rgba(26,71,49,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(168,224,99,0.15);
  transition: 0.3s;
  height: 85px;
}

/* SCROLL EFECTO */
.navbar-custom.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* LOGO */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: white;
  text-decoration: none !important;
  color: white !important;
}

.nav-logo span span {
  color: var(--green-light);
}

.logo-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* BOTÓN MOBILE */
.navbar-toggler.custom-toggler {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 48px !important;
  height: 48px !important;
  border: 2px solid #a8e063 !important;
  padding: 0 !important;
  border-radius: 12px;
  background: rgba(168, 224, 99, 0.15) !important;
  transition: 0.3s;
  outline: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1100 !important;
}

.custom-toggler:hover {
  background: rgba(168, 224, 99, 0.3) !important;
  transform: scale(1.05);
}

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

@media (min-width: 992px) {
  .navbar-toggler.custom-toggler {
    display: none !important;
  }
}

@media (max-width: 576px) {
  .logo-img {
    width: 45px !important;
    height: 45px !important;
  }
  .nav-logo {
    font-size: 1.3rem !important;
  }
  .navbar-custom {
    padding: 0.5rem 0 !important;
  }
}

@media (max-width: 991px) {
  .navbar-custom {
    height: auto !important;
    padding: 0.75rem 0;
  }

  .navbar-collapse {
    background: rgba(26, 71, 49, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    margin-top: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(168, 224, 99, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    max-height: 80vh;
    overflow-y: auto;
  }

  .navbar-nav {
    gap: 10px;
  }

  .navbar-nav .nav-link {
    padding: 0.8rem 1.2rem !important;
    background: rgba(255, 255, 255, 0.05);
  }

  .dropdown-usuario {
    margin-top: 10px;
  }

  .btn-usuario {
    width: 100%;
    justify-content: space-between;
    padding: 0.8rem 1.2rem !important;
    border-radius: 15px !important;
    opacity: 1 !important; /* Asegurar que sea visible */
  }

  .dropdown-menu-usuario {
    position: static !important;
    width: 100%;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    margin-top: 8px !important;
    padding: 0.5rem !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .btn-cerrar-sesion {
    color: #ff8a65 !important; /* Color más visible sobre fondo oscuro */
  }

  .btn-admin-perfil {
    color: #a8e063 !important;
  }
}

.nav-logo:hover {
  text-decoration: none !important;
  color: white !important;
}

.section {
  padding: 6rem 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.productos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-main);
  background: rgba(45,122,79,0.1);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  margin-top: 35px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.section-title span {
  color: var(--green-main);
}

.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  border: 2px solid var(--green-main);
  background: transparent;
  color: var(--green-main);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--green-main);
  color: white;
}

.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.tutorial-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(29,74,49,0.12);
  transition: 0.3s ease;
  position: relative;
}

.tutorial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 56px rgba(29,74,49,0.2);
}

.tc-img {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: rgba(255,255,255,0.85);
}

.tc-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.95);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  color: var(--text-dark);
}

.tutorial-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--text-dark);
  padding: 1rem 1.25rem 0.5rem;
}

.tutorial-card > p {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0 1.25rem 1rem;
}

.tc-extra {
  background: var(--green-pale);
  border-top: 1px solid rgba(45,122,79,0.1);
  padding: 0.75rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-dark);
}

.btn-ver-mas {
  margin: 0 1.25rem 1.25rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: transparent;
  border: 2px solid var(--green-main);
  color: var(--green-main);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-ver-mas:hover {
  background: var(--green-main);
  color: var(--white);
}

.btn-ver-mas i {
  transition: transform 0.3s;
}

.btn-ver-mas.open i {
  transform: rotate(180deg);
}

@media (max-width: 768px) {
  .tutorials-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== SECCIÓN TUTORIALES ===== */

.section {
  padding: 4rem 0;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.section-title span {
  color: #2d7a4f;
}

.section-sub {
  color: #7a9480;
  margin-bottom: 2rem;
}

/* GRID */
.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* TARJETA */
.tutorial-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  transition: 0.3s;
  position: relative;
}

.tutorial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.tarjeta-oculta {
  display: none !important;
}

/* IMAGEN */
.tc-img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

/* CONTENIDO */
.tc-body {
  padding: 1rem;
}

.tc-body h5 {
  margin-bottom: 0.5rem;
  color: #1b2a1d;
}

.tc-body p {
  font-size: 0.9rem;
  color: #3a4d3c;
}

/* META (nivel + fecha) */
.tc-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #7a9480;
  margin-top: 0.5rem;
}

/* BADGE */
.tc-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #fff;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* SECCIÓN OCULTA (materiales) */
.tc-extra {
  display: none;
  background: #e8f5e4;
  padding: 12px 16px;
  border-top: 1px solid rgba(45,122,79,0.15);
}

.tc-extra ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tc-extra ul li::before {
  content: "🌿 ";
  font-size: 0.75rem;
}

.tc-extra ul li {
  font-size: 0.85rem;
  color: #1b2a1d;
}

.btn-ver-mas {
  display: block;
  margin: 12px auto;
  padding: 8px 20px;
  border-radius: 999px;
  border: 2px solid #2d7a4f;
  background: transparent;
  color: #2d7a4f;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: 0.3s ease;
}

.btn-ver-mas:hover {
  background: #2d7a4f;
  color: white;
}

/* === EQUIPO === */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.team-card {
  background: #ffffff !important;
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}
.team-card:hover { transform: translateY(-6px); box-shadow: 0 20px 56px rgba(29,74,49,0.2); }

.team-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--white);
  margin: 0 auto 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.team-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}
.team-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.team-role {
  display: inline-block;
  background: var(--green-pale);
  color: var(--green-main);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
}

.team-focus {
  background: var(--green-dark);
  color: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.team-focus i { font-size: 1.4rem; color: var(--green-light); margin-top: 0.2rem; flex-shrink: 0; }
.team-focus p { font-size: 0.95rem; color: rgba(255,255,255,0.8); line-height: 1.8; }
.team-focus strong { color: var(--green-light); }

.dropdown-usuario {
  position: relative;
}

.btn-usuario {
  background: rgba(168,224,99,0.15);
  border: 1px solid rgba(168,224,99,0.3);
  color: white;
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: 0.3s;
  opacity: 0;
}

.btn-usuario:hover {
  background: rgba(168,224,99,0.25);
}

/* Avatar Miniatura Header */
.header-avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-weight: 700;
  font-size: 0.8rem;
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.header-avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-avatar-mini i {
  font-size: 1.2rem;
}

.dropdown-menu-usuario {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  padding: 0.5rem;
  min-width: 160px;
  z-index: 999;
}

.dropdown-menu-usuario.open {
  display: block;
}

.btn-cerrar-sesion {
  width: 100%;
  background: transparent;
  border: none;
  color: #e05c2d;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: 0.3s;
}

.btn-cerrar-sesion:hover {
  background: rgba(224,92,45,0.08);
}

.banner-content {
  position: relative;
  z-index: 3;
  background: rgb(228, 248, 215);
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
  border-radius: 20px;
  padding: 40px 45px;
  max-width: 480px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.banner-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #1b2a1d;
}
.banner-title span { color: var(--green-light); }

.btn-outline {
  background: transparent !important;
  color: #1b2a1d !important;
  border: 2px solid #2d7a4f !important;
  border-radius: 999px !important;
}

.btn-outline:hover {
  background: rgba(45,122,79,0.1) !important;
}

/*mostrar mensaje de recuperacion de contraseña*/
.text-success{
  padding: 12px;
  border: 2px solid #28a745;
  border-radius: 8px;
  background-color: rgba(40, 167, 69, 0.1);
  color: #28a745;
  font-size: 14px;
  text-align: center;
}

/* botón agregar */
.add-btn {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #28a745;
  color: white;
  font-weight: bold;
}

/* imagen */
.add-btn img {
  width: 20px;
  height: 20px;
}

/* ══════════════════════════════════════════════
   TARJETA DE PRODUCTO
   ══════════════════════════════════════════════ */
.product-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
  height: 100%;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 32px rgba(0,0,0,.13);
}

/* imagen */
.pc-img {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #f0f0f0;
}
.pc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* badge categoría */
.pc-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255,255,255,.92);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: .72rem;
  font-weight: 600;
  color: #333;
  backdrop-filter: blur(4px);
}

/* cuerpo */
.pc-body {
  padding: 16px 18px 10px;
  flex: 1;
}
.pc-body h5 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: #1a1a1a;
}
.pc-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2e7d32;
  margin-bottom: 8px;
}
.pc-material {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e8f5e9;
  color: #388e3c;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .72rem;
  font-weight: 500;
}

/* acciones */
.pc-actions {
  display: flex;
  gap: 8px;
  padding: 12px 18px 16px;
}
.btn-admin {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f5f5f5;
  color: #555;
  border: none;
  border-radius: 10px;
  padding: 9px 0;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.btn-admin:hover { background: #e0e0e0; }

.btn-venta {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #56ab2f, #a8e063);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 0;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  box-shadow: 0 3px 10px rgba(86,171,47,.3);
}
.btn-venta:hover  { opacity: .9; }
.btn-venta:active { transform: scale(.97); }


/* ══════════════════════════════════════════════
   MODAL REGISTRAR VENTA
   ══════════════════════════════════════════════ */
.modal-venta-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
.modal-venta-backdrop.open {
  display: flex;
  animation: fadeInBackdrop .2s ease;
}
@keyframes fadeInBackdrop {
  from { opacity: 0 }
  to   { opacity: 1 }
}

.modal-venta-box {
  background: #fff;
  border-radius: 18px;
  padding: 30px 32px;
  width: 340px;
  max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0 }
  to   { transform: translateY(0);    opacity: 1 }
}

.modal-venta-box h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.modal-venta-box p.mv-prod {
  font-size: .85rem;
  color: #777;
  margin-bottom: 20px;
}

.mv-campo label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}
.mv-campo input[type="number"] {
  width: 100%;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 1rem;
  outline: none;
  transition: border-color .2s;
}
.mv-campo input[type="number"]:focus { border-color: #56ab2f; }

.mv-total {
  margin: 14px 0 20px;
  padding: 12px 16px;
  background: #f1f8e9;
  border-radius: 10px;
  font-size: .9rem;
  color: #2e7d32;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}

.mv-btns {
  display: flex;
  gap: 10px;
}
.mv-btns button {
  flex: 1;
  padding: 11px 0;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  transition: opacity .2s;
}
.mv-btns button:hover    { opacity: .88; }
.btn-mv-cancelar         { background: #f5f5f5; color: #555; }
.btn-mv-confirmar {
  background: linear-gradient(135deg, #56ab2f, #a8e063);
  color: #fff;
  box-shadow: 0 3px 10px rgba(86,171,47,.3);
}


/* ══════════════════════════════════════════════
   TOAST CONFIRMACIÓN
   ══════════════════════════════════════════════ */
.toast-venta {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #2e7d32;
  color: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  z-index: 9999;
  display: none;
  gap: 8px;
  align-items: center;
}
.toast-venta.show {
  display: flex;
  animation: slideUp .25s ease;
}

/* ══════════════════════════════════════════════
   TARJETA DE PRODUCTO
   ══════════════════════════════════════════════ */
.product-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
  height: 100%;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 32px rgba(0,0,0,.13);
}

/* imagen */
.pc-img {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #f0f0f0;
}
.pc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* badge categoría */
.pc-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255,255,255,.92);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: .72rem;
  font-weight: 600;
  color: #333;
  backdrop-filter: blur(4px);
}

/* cuerpo */
.pc-body {
  padding: 16px 18px 10px;
  flex: 1;
}
.pc-body h5 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: #1a1a1a;
}
.pc-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2e7d32;
  margin-bottom: 8px;
}
.pc-material {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e8f5e9;
  color: #388e3c;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .72rem;
  font-weight: 500;
}

/* acciones */
.pc-actions {
  display: flex;
  gap: 8px;
  padding: 12px 18px 16px;
}
.btn-admin {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f5f5f5;
  color: #555;
  border: none;
  border-radius: 10px;
  padding: 9px 0;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.btn-admin:hover { background: #e0e0e0; }

.btn-venta {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #56ab2f, #a8e063);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 0;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  box-shadow: 0 3px 10px rgba(86,171,47,.3);
}
.btn-venta:hover  { opacity: .9; }
.btn-venta:active { transform: scale(.97); }


/* ══════════════════════════════════════════════
   MODAL REGISTRAR VENTA
   ══════════════════════════════════════════════ */
.modal-venta-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
.modal-venta-backdrop.open {
  display: flex;
  animation: fadeInBackdrop .2s ease;
}
@keyframes fadeInBackdrop {
  from { opacity: 0 }
  to   { opacity: 1 }
}

.modal-venta-box {
  background: #fff;
  border-radius: 18px;
  padding: 30px 32px;
  width: 340px;
  max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0 }
  to   { transform: translateY(0);    opacity: 1 }
}

.modal-venta-box h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.modal-venta-box p.mv-prod {
  font-size: .85rem;
  color: #777;
  margin-bottom: 20px;
}

.mv-campo label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}
.mv-campo input[type="number"] {
  width: 100%;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 1rem;
  outline: none;
  transition: border-color .2s;
}
.mv-campo input[type="number"]:focus { border-color: #56ab2f; }

.mv-total {
  margin: 14px 0 20px;
  padding: 12px 16px;
  background: #f1f8e9;
  border-radius: 10px;
  font-size: .9rem;
  color: #2e7d32;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}

.mv-btns {
  display: flex;
  gap: 10px;
}
.mv-btns button {
  flex: 1;
  padding: 11px 0;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  transition: opacity .2s;
}
.mv-btns button:hover    { opacity: .88; }
.btn-mv-cancelar         { background: #f5f5f5; color: #555; }
.btn-mv-confirmar {
  background: linear-gradient(135deg, #56ab2f, #a8e063);
  color: #fff;
  box-shadow: 0 3px 10px rgba(86,171,47,.3);
}


/* ══════════════════════════════════════════════
   TOAST CONFIRMACIÓN
   ══════════════════════════════════════════════ */
.toast-venta {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #2e7d32;
  color: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  z-index: 9999;
  display: none;
  gap: 8px;
  align-items: center;
}
.toast-venta.show {
  display: flex;
  animation: slideUp .25s ease;
}


/* ══════════════════════════════════════════════
   MODAL ADMINISTRAR PRODUCTO
   ══════════════════════════════════════════════ */
.modal-admin-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9100;
  align-items: flex-start;
  justify-content: center;
  padding: 30px 16px 30px;
  overflow-y: auto;
}
.modal-admin-backdrop.open {
  display: flex;
  animation: fadeInBackdrop .2s ease;
}

.modal-admin-box {
  background: #fff;
  border-radius: 18px;
  width: 520px;
  max-width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
  animation: slideUp .25s ease;
  overflow: hidden;
}

/* cabecera */
.ma-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f0f0f0;
}
.ma-header h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  margin: 0;
  color: #1a1a1a;
}
.ma-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #888;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background .2s, color .2s;
}
.ma-close:hover { background: #f5f5f5; color: #333; }

/* sección genérica */
.ma-seccion {
  padding: 16px 24px;
  border-bottom: 1px solid #f5f5f5;
}
.ma-seccion-titulo {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #888;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ma-badge {
  background: #e8f5e9;
  color: #388e3c;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

/* input + botón en fila */
.ma-fila {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ma-input {
  flex: 1;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
  background: #fafafa;
}
.ma-input:focus { border-color: #56ab2f; background: #fff; }
.ma-select { cursor: pointer; }

.ma-btn-guardar-campo {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f0f8ec;
  color: #388e3c;
  border: 1.5px solid #b8ddb0;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.ma-btn-guardar-campo:hover { background: #ddf0d5; border-color: #56ab2f; }

/* galería imágenes */
.ma-galeria {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  min-height: 10px;
}
.ma-img-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #e0e0e0;
}
.ma-img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ma-img-del {
  position: absolute;
  top: 3px;
  right: 3px;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  border-radius: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  cursor: pointer;
  transition: background .2s;
}
.ma-img-del:hover { background: #c62828; }

.ma-btn-add-img {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fafafa;
  border: 2px dashed #c8e6c9;
  color: #56ab2f;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.ma-btn-add-img:hover { background: #f1f8e9; border-color: #56ab2f; }
.ma-btn-add-img:disabled { opacity: .45; cursor: not-allowed; }

/* lista materiales */
.ma-lista-materiales {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ma-material-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f9f9f9;
  border: 1px solid #ebebeb;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: .88rem;
  color: #333;
}
.ma-material-acciones {
  display: flex;
  gap: 6px;
}
.ma-btn-mat {
  background: none;
  border: 1px solid #ddd;
  border-radius: 7px;
  padding: 4px 9px;
  font-size: .75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background .2s;
}
.ma-btn-mat.editar { color: #1976d2; border-color: #bbdefb; }
.ma-btn-mat.editar:hover { background: #e3f2fd; }
.ma-btn-mat.eliminar { color: #c62828; border-color: #ffcdd2; }
.ma-btn-mat.eliminar:hover { background: #ffebee; }

.ma-btn-agregar {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  background: #56ab2f;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}
.ma-btn-agregar:hover { opacity: .88; }

.ma-btn-modificar-mat {
  white-space: nowrap;
}

/* acciones finales */
.ma-acciones-finales {
  display: flex;
  gap: 10px;
  padding: 18px 24px;
  justify-content: space-between;
}
.ma-btn-eliminar {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  color: #c62828;
  border: 1.5px solid #ffcdd2;
  border-radius: 10px;
  padding: 11px 18px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.ma-btn-eliminar:hover { background: #ffebee; }

.ma-btn-guardar-todo {
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #56ab2f, #a8e063);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 22px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(86,171,47,.3);
  transition: opacity .2s;
}
.ma-btn-guardar-todo:hover { opacity: .9; }

/* helper Bootstrap */
.d-none { display: none !important; }

/* ══════════════════════════════════════════════════
   MODAL ADMINISTRAR PRODUCTO — Diseño ReCrea
   Paleta: verde naturaleza + tierra + blanco limpio
   ══════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────── */
:root {
  --rc-green:      #56ab2f;
  --rc-green-dark: #3d7d20;
  --rc-green-soft: #e8f5e0;
  --rc-lime:       #a8e063;
  --rc-earth:      #8b6f47;
  --rc-earth-soft: #f5f0e8;
  --rc-cream:      #fdfaf5;
  --rc-dark:       #1e2a18;
  --rc-gray:       #6b7280;
  --rc-gray-light: #f3f4f6;
  --rc-border:     #d1e8c2;
  --rc-red:        #dc2626;
  --rc-shadow:     0 25px 60px rgba(30, 42, 24, 0.18);
  --rc-radius:     20px;
  --rc-radius-sm:  12px;
}

/* ── Backdrop personalizado ─────────────────────── */
#modalAdminProducto .modal-dialog {
  max-width: 640px;
  margin: 1.5rem auto;
}

#modalAdminProducto .modal-content {
  border: none;
  border-radius: var(--rc-radius);
  background: var(--rc-cream);
  box-shadow: var(--rc-shadow);
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
}

/* ── HEADER ─────────────────────────────────────── */
#modalAdminProducto .modal-header {
  background: linear-gradient(135deg, var(--rc-green-dark) 0%, var(--rc-green) 55%, var(--rc-lime) 100%);
  padding: 1.6rem 2rem 1.4rem;
  border-bottom: none;
  position: relative;
  overflow: hidden;
}

/* Decoración de fondo en el header */
#modalAdminProducto .modal-header::before {
  content: "♻";
  font-size: 7rem;
  position: absolute;
  right: -1rem;
  top: -1.5rem;
  opacity: 0.12;
  line-height: 1;
  pointer-events: none;
}

#modalAdminProducto .modal-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

#modalAdminProducto .modal-title {
  color: #3d7d20 !important;
  font-family: 'Playfair Display', serif !important;
  font-size: 1.45rem !important;
  font-weight: 700 !important;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#modalAdminProducto .modal-title::before {
  content: "⚙️";
  font-size: 1.2rem;
}

#modalAdminProducto .btn-close {
  background: rgba(255,255,255,0.25) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/0.8em no-repeat;
  border-radius: 50%;
  opacity: 1;
  width: 2rem;
  height: 2rem;
  transition: background-color 0.2s, transform 0.2s;
}

#modalAdminProducto .btn-close:hover {
  background-color: rgba(255,255,255,0.4);
  transform: rotate(90deg);
}

/* ── BODY ────────────────────────────────────────── */
#modalAdminProducto .modal-body {
  padding: 2rem 2rem 1rem;
  background: var(--rc-cream);
  max-height: 65vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rc-border) transparent;
}

#modalAdminProducto .modal-body::-webkit-scrollbar {
  width: 5px;
}
#modalAdminProducto .modal-body::-webkit-scrollbar-thumb {
  background: var(--rc-border);
  border-radius: 99px;
}

/* ── Labels ────────────────────────────────────── */
#modalAdminProducto .form-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rc-earth);
  margin-bottom: 0.45rem;
  display: block;
}

/* ── Inputs & Selects ──────────────────────────── */
#modalAdminProducto .form-control,
#modalAdminProducto .form-select {
  border: 1.5px solid var(--rc-border);
  border-radius: var(--rc-radius-sm);
  background: #fff;
  color: var(--rc-dark);
  font-size: 0.95rem;
  padding: 0.65rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: 'DM Sans', sans-serif;
}

#modalAdminProducto .form-control:focus,
#modalAdminProducto .form-select:focus {
  border-color: var(--rc-green);
  box-shadow: 0 0 0 3px rgba(60, 132, 27, 0.18);
  outline: none;
  background: #fff;
}

#modalAdminProducto .form-control::placeholder {
  color: #b0bec5;
}

/* ── Sección de imagen ─────────────────────────── */
#modalAdminProducto #adminGaleriaImagenes {
  background: var(--rc-green-soft);
  border: 1.5px dashed var(--rc-border);
  border-radius: var(--rc-radius-sm);
  padding: 0.75rem;
  min-height: 56px;
  gap: 0.6rem !important;
}

#modalAdminProducto #adminGaleriaImagenes:empty::after {
  content: "Sin imágenes cargadas";
  color: var(--rc-gray);
  font-size: 0.85rem;
  display: block;
  text-align: center;
  padding: 0.5rem 0;
}

/* Miniaturas de imagen */
#modalAdminProducto #adminGaleriaImagenes .position-relative img {
  border-radius: 10px;
  border: 2px solid var(--rc-border);
  transition: transform 0.2s;
  object-fit: cover;
}

#modalAdminProducto #adminGaleriaImagenes .position-relative img:hover {
  transform: scale(1.05);
  border-color: var(--rc-green);
}

#modalAdminProducto #adminGaleriaImagenes .position-relative .btn-danger {
  width: 20px;
  height: 20px;
  font-size: 0.65rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  line-height: 1;
}

/* ── Sección de materiales ─────────────────────── */
#modalAdminProducto #adminListaMateriales {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#modalAdminProducto #adminListaMateriales > div {
  background: var(--rc-earth-soft) !important;
  border: 1.5px solid #e0d4c0;
  border-radius: var(--rc-radius-sm);
  padding: 0.55rem 0.85rem !important;
  transition: box-shadow 0.15s;
}

#modalAdminProducto #adminListaMateriales > div:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

#modalAdminProducto #adminListaMateriales .texto-material {
  font-size: 0.9rem;
  color: var(--rc-earth);
  font-weight: 500;
}

/* Botones dentro de materiales */
#modalAdminProducto #adminListaMateriales .btn-warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s;
}
#modalAdminProducto #adminListaMateriales .btn-warning:hover {
  background: #ffc107;
  color: #fff;
}

#modalAdminProducto #adminListaMateriales .btn-danger {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-weight: 600;
}

/* Input + botón agregar material */
#modalAdminProducto #adminMaterialInput {
  flex: 1;
}

#modalAdminProducto .btn-success {
  background: linear-gradient(135deg, var(--rc-green-dark), var(--rc-green));
  border: none;
  border-radius: var(--rc-radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.6rem 1.1rem;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.15s;
  font-family: 'DM Sans', sans-serif;
}

#modalAdminProducto .btn-success:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* ── FOOTER ─────────────────────────────────────── */
#modalAdminProducto .modal-footer {
  background: var(--rc-gray-light);
  border-top: 1.5px solid var(--rc-border);
  padding: 1.1rem 2rem;
  border-radius: 0 0 var(--rc-radius) var(--rc-radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Botón eliminar */
#modalAdminProducto #btnAdminEliminar {
  background: transparent;
  border: 1.5px solid var(--rc-red);
  color: var(--rc-red);
  border-radius: var(--rc-radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  font-family: 'DM Sans', sans-serif;
}

#modalAdminProducto #btnAdminEliminar:hover {
  background: var(--rc-red);
  color: #fff;
  transform: translateY(-1px);
}

/* Botón cancelar */
#modalAdminProducto .btn-secondary {
  background: transparent;
  border: 1.5px solid var(--rc-border);
  color: var(--rc-gray);
  border-radius: var(--rc-radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.2rem;
  transition: border-color 0.2s, color 0.2s;
  font-family: 'DM Sans', sans-serif;
}

#modalAdminProducto .btn-secondary:hover {
  border-color: var(--rc-gray);
  color: var(--rc-dark);
  background: transparent;
}

/* Botón guardar */
#modalAdminProducto #btnAdminGuardar {
  background: linear-gradient(135deg, var(--rc-green-dark), var(--rc-green));
  border: none;
  border-radius: var(--rc-radius-sm);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.6rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 14px rgba(86, 171, 47, 0.35);
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  font-family: 'DM Sans', sans-serif;
}

#modalAdminProducto #btnAdminGuardar:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(86, 171, 47, 0.45);
}

/* ── Animación de entrada del modal ─────────────── */
#modalAdminProducto.show .modal-content {
  animation: rcModalIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rcModalIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Separadores visuales entre secciones ───────── */
#modalAdminProducto .modal-body .mb-4:not(:last-child) {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rc-border);
}

/* ── Texto de ayuda ─────────────────────────────── */
#modalAdminProducto .text-muted {
  font-size: 0.78rem;
  color: var(--rc-gray) !important;
  margin-top: 0.3rem;
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 576px) {
  #modalAdminProducto .modal-dialog {
    margin: 0.5rem;
  }
  #modalAdminProducto .modal-header,
  #modalAdminProducto .modal-body,
  #modalAdminProducto .modal-footer {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  #modalAdminProducto .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }
  #modalAdminProducto #btnAdminEliminar,
  #modalAdminProducto #btnAdminGuardar,
  #modalAdminProducto .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  #modalAdminProducto .modal-footer > div {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ══════════════════════════════════════════════════
   MODAL AGREGAR PRODUCTO 
   ══════════════════════════════════════════════════ */

/* ── ESTRUCTURA BASE (idéntica a admin) ─────────── */
#modalAgregarProducto .modal-dialog {
  max-width: 640px;
  margin: 1.5rem auto;
}

#modalAgregarProducto .modal-content {
  border: none;
  border-radius: var(--rc-radius);
  background: var(--rc-cream);
  box-shadow: var(--rc-shadow);
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
}

/* ── HEADER ─────────────────────────────────────── */
#modalAgregarProducto .modal-header {
  background: linear-gradient(135deg, var(--rc-green-dark) 0%, var(--rc-green) 55%, var(--rc-lime) 100%);
  padding: 1.6rem 2rem 1.4rem;
  border-bottom: none;
  position: relative;
  overflow: hidden;
}

#modalAgregarProducto .modal-header::before {
  content: "🌱";
  font-size: 6rem;
  position: absolute;
  right: 0.5rem;
  top: -1rem;
  opacity: 0.15;
  line-height: 1;
  pointer-events: none;
}

#modalAgregarProducto .modal-header::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

#modalAgregarProducto .modal-title {
  color: #3d7d20 !important;
  font-family: 'Playfair Display', serif !important;
  font-size: 1.45rem !important;
  font-weight: 700 !important;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#modalAgregarProducto .modal-title::before {
  content: "➕";
  font-size: 1.1rem;
}

#modalAgregarProducto .btn-close {
  background: rgba(255,255,255,0.25) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/0.8em no-repeat;
  border-radius: 50%;
  opacity: 1;
  width: 2rem;
  height: 2rem;
  transition: background-color 0.2s, transform 0.2s;
}

#modalAgregarProducto .btn-close:hover {
  background-color: rgba(255,255,255,0.4);
  transform: rotate(90deg);
}

/* ── BODY ────────────────────────────────────────── */
#modalAgregarProducto .modal-body {
  padding: 2rem 2rem 1rem;
  background: var(--rc-cream);
  max-height: 65vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rc-border) transparent;
}

#modalAgregarProducto .modal-body::-webkit-scrollbar { width: 5px; }
#modalAgregarProducto .modal-body::-webkit-scrollbar-thumb {
  background: var(--rc-border);
  border-radius: 99px;
}

/* Labels */
#modalAgregarProducto .form-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rc-earth);
  margin-bottom: 0.45rem;
  display: block;
}

/* Inputs & Selects */
#modalAgregarProducto .form-control,
#modalAgregarProducto .form-select {
  border: 1.5px solid var(--rc-border);
  border-radius: var(--rc-radius-sm);
  background: #fff;
  color: var(--rc-dark);
  font-size: 0.95rem;
  padding: 0.65rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: 'DM Sans', sans-serif;
}

#modalAgregarProducto .form-control:focus,
#modalAgregarProducto .form-select:focus {
  border-color: var(--rc-green);
  box-shadow: 0 0 0 3px rgba(86, 171, 47, 0.18);
  outline: none;
  background: #fff;
}

#modalAgregarProducto .form-control::placeholder { color: #b0bec5; }

/* Error state */
#modalAgregarProducto .rc-input-error {
  border-color: var(--rc-red) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
  animation: rcShake 0.35s ease;
}

@keyframes rcShake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-5px); }
  75%       { transform: translateX(5px); }
}

/* Input con prefijo $ */
.rc-input-prefix {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid var(--rc-border);
  border-radius: var(--rc-radius-sm);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rc-input-prefix:focus-within {
  border-color: var(--rc-green);
  box-shadow: 0 0 0 3px rgba(86, 171, 47, 0.18);
}

.rc-input-prefix > span {
  padding: 0 0.85rem;
  font-weight: 700;
  color: var(--rc-green-dark);
  font-size: 1rem;
  background: var(--rc-green-soft);
  border-right: 1.5px solid var(--rc-border);
  height: 100%;
  display: flex;
  align-items: center;
  align-self: stretch;
  line-height: 1;
}

.rc-input-prefix .form-control {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Cantidad */
#modalAgregarProducto .rc-qty-input {
  max-width: 160px;
}

/* Separadores */
#modalAgregarProducto .modal-body .mb-4:not(:last-child) {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rc-border);
}

/* ── GALERÍA ─────────────────────────────────────── */
.rc-galeria {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  background: var(--rc-green-soft);
  border: 1.5px dashed var(--rc-border);
  border-radius: var(--rc-radius-sm);
  padding: 0.75rem;
  min-height: 56px;
  align-items: flex-start;
}

.rc-galeria:empty::after {
  content: "Sin imágenes — agrega una abajo";
  color: var(--rc-gray);
  font-size: 0.85rem;
  display: block;
  text-align: center;
  width: 100%;
  padding: 0.5rem 0;
}

/* Miniatura */
.rc-thumb {
  position: relative;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.rc-thumb.rc-thumb-in {
  opacity: 1;
  transform: scale(1);
}

.rc-thumb.rc-thumb-out {
  opacity: 0;
  transform: scale(0.8);
}

.rc-thumb img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--rc-border);
  display: block;
  transition: border-color 0.2s, transform 0.2s;
}

.rc-thumb:hover img {
  border-color: var(--rc-green);
  transform: scale(1.04);
}

.rc-thumb-del {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  background: var(--rc-red);
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: background 0.2s, transform 0.15s;
  padding: 0;
}

.rc-thumb-del:hover {
  background: #b91c1c;
  transform: scale(1.15);
}

/* Botón agregar imagen */
.rc-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  background: #fff;
  border: 1.5px solid var(--rc-green);
  color: var(--rc-green-dark);
  border-radius: var(--rc-radius-sm);
  padding: 0.5rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  user-select: none;
}

.rc-upload-btn:hover {
  background: var(--rc-green-soft);
  transform: translateY(-1px);
}

/* ── MATERIALES ──────────────────────────────────── */
.rc-materiales-lista {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.rc-mat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--rc-earth-soft);
  border: 1.5px solid #e0d4c0;
  border-radius: var(--rc-radius-sm);
  padding: 0.55rem 0.85rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.22s ease, transform 0.22s ease,
              border-color 0.2s, box-shadow 0.2s;
}

.rc-mat-item.rc-mat-in {
  opacity: 1;
  transform: translateX(0);
}

.rc-mat-item.rc-mat-out {
  opacity: 0;
  transform: translateX(10px);
}

.rc-mat-item.rc-mat-editing {
  border-color: var(--rc-green);
  background: var(--rc-green-soft);
  box-shadow: 0 0 0 3px rgba(86,171,47,0.15);
}

.rc-mat-item.rc-mat-updated {
  animation: rcPulse 0.5s ease;
}

@keyframes rcPulse {
  0%   { box-shadow: 0 0 0 0 rgba(86,171,47,0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(86,171,47,0); }
  100% { box-shadow: none; }
}

.rc-mat-texto {
  font-size: 0.9rem;
  color: var(--rc-earth);
  font-weight: 500;
}

.rc-mat-acciones {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.btn-rc-mat-edit {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: background 0.2s, color 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.btn-rc-mat-edit:hover {
  background: #ffc107;
  color: #fff;
}

.btn-rc-mat-del {
  background: #fee2e2;
  border: 1px solid var(--rc-red);
  color: var(--rc-red);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.btn-rc-mat-del:hover {
  background: var(--rc-red);
  color: #fff;
}

/* Fila input + botón material */
.rc-material-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.rc-material-row .form-control { flex: 1; }

.btn-rc-material {
  background: linear-gradient(135deg, var(--rc-green-dark), var(--rc-green));
  border: none;
  border-radius: var(--rc-radius-sm);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.15s;
  font-family: 'DM Sans', sans-serif;
}

.btn-rc-material:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* Hint de edición */
.rc-edit-hint {
  font-size: 0.8rem;
  color: var(--rc-green-dark);
  background: var(--rc-green-soft);
  border: 1px solid var(--rc-border);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── FOOTER ──────────────────────────────────────── */
#modalAgregarProducto .modal-footer {
  background: var(--rc-gray-light);
  border-top: 1.5px solid var(--rc-border);
  padding: 1.1rem 2rem;
  border-radius: 0 0 var(--rc-radius) var(--rc-radius);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-rc-cancelar {
  background: transparent;
  border: 1.5px solid var(--rc-border);
  color: var(--rc-gray);
  border-radius: var(--rc-radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.2rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.btn-rc-cancelar:hover {
  border-color: var(--rc-gray);
  color: var(--rc-dark);
}

.btn-rc-guardar {
  background: linear-gradient(135deg, var(--rc-green-dark), var(--rc-green));
  border: none;
  border-radius: var(--rc-radius-sm);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.6rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 14px rgba(86, 171, 47, 0.35);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.btn-rc-guardar:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(86, 171, 47, 0.45);
}

/* ── Animación modal ─────────────────────────────── */
#modalAgregarProducto.show .modal-content {
  animation: rcModalIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Texto ayuda */
#modalAgregarProducto .text-muted {
  font-size: 0.78rem;
  color: var(--rc-gray) !important;
}

/* ── Responsive ─────────── */
@media (max-width: 576px) {
  #modalAgregarProducto .modal-dialog { margin: 0.5rem; }
  #modalAgregarProducto .modal-header,
  #modalAgregarProducto .modal-body,
  #modalAgregarProducto .modal-footer {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  #modalAgregarProducto .modal-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .btn-rc-cancelar,
  .btn-rc-guardar { width: 100%; justify-content: center; }
  .rc-qty-input   { max-width: 100% !important; }
}

/*agregar producto/*

:root {
  --rc-green:      #56ab2f;
  --rc-green-dark: #3d7d20;
  --rc-green-soft: #e8f5e0;
  --rc-lime:       #a8e063;
  --rc-earth:      #8b6f47;
  --rc-earth-soft: #f5f0e8;
  --rc-cream:      #fdfaf5;
  --rc-dark:       #1e2a18;
  --rc-gray:       #6b7280;
  --rc-gray-light: #f3f4f6;
  --rc-border:     #d1e8c2;
  --rc-red:        #dc2626;
  --rc-shadow:     0 25px 60px rgba(30, 42, 24, 0.18);
  --rc-radius:     20px;
  --rc-radius-sm:  12px;
}

/* ── Dialog ─────────────────────────────────────── */
#modalAgregarProducto .modal-dialog {
  max-width: 640px;
  margin: 1.5rem auto;
}

#modalAgregarProducto .modal-content {
  border: none;
  border-radius: var(--rc-radius);
  background: var(--rc-cream);
  box-shadow: var(--rc-shadow);
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
}

/* ── HEADER ─────────────────────────────────────── */
#modalAgregarProducto .modal-header {
  background: linear-gradient(135deg, var(--rc-green-dark) 0%, var(--rc-green) 55%, var(--rc-lime) 100%);
  padding: 1.6rem 2rem 1.4rem;
  border-bottom: none;
  position: relative;
  overflow: hidden;
}

#modalAgregarProducto .modal-header::before {
  content: "♻";
  font-size: 7rem;
  position: absolute;
  right: -1rem;
  top: -1.5rem;
  opacity: 0.12;
  line-height: 1;
  pointer-events: none;
}

#modalAgregarProducto .modal-header::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

#modalAgregarProducto .modal-title {
  color: #3d7d20 !important;
  font-family: 'Playfair Display', serif !important;
  font-size: 1.45rem !important;
  font-weight: 700 !important;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#modalAgregarProducto .modal-title::before {
  content: "🌱";
  font-size: 1.2rem;
}

#modalAgregarProducto .btn-close {
  background: rgba(255,255,255,0.25) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/0.8em no-repeat;
  border-radius: 50%;
  opacity: 1;
  width: 2rem;
  height: 2rem;
  transition: background-color 0.2s, transform 0.2s;
}

#modalAgregarProducto .btn-close:hover {
  background-color: rgba(255,255,255,0.4);
  transform: rotate(90deg);
}

/* ── BODY ────────────────────────────────────────── */
#modalAgregarProducto .modal-body {
  padding: 2rem 2rem 1rem;
  background: var(--rc-cream);
  max-height: 65vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rc-border) transparent;
}

#modalAgregarProducto .modal-body::-webkit-scrollbar { width: 5px; }
#modalAgregarProducto .modal-body::-webkit-scrollbar-thumb {
  background: var(--rc-border);
  border-radius: 99px;
}

/* ── Labels ────────────────────────────────────── */
#modalAgregarProducto .form-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rc-earth);
  margin-bottom: 0.45rem;
  display: block;
}

/* ── Inputs & Selects ──────────────────────────── */
#modalAgregarProducto .form-control,
#modalAgregarProducto .form-select {
  border: 1.5px solid var(--rc-border);
  border-radius: var(--rc-radius-sm);
  background: #fff;
  color: var(--rc-dark);
  font-size: 0.95rem;
  padding: 0.65rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: 'DM Sans', sans-serif;
}

#modalAgregarProducto .form-control:focus,
#modalAgregarProducto .form-select:focus {
  border-color: var(--rc-green);
  box-shadow: 0 0 0 3px rgba(86, 171, 47, 0.18);
  outline: none;
  background: #fff;
}

#modalAgregarProducto .form-control::placeholder { color: #b0bec5; }

/* Error state */
#modalAgregarProducto .rc-input-error {
  border-color: var(--rc-red) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
  animation: rcShake 0.35s ease;
}

@keyframes rcShake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-5px); }
  75%      { transform: translateX(5px); }
}

/* ── Precio con prefijo $ ───────────────────────── */
#modalAgregarProducto .rc-input-prefix {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--rc-border);
  border-radius: var(--rc-radius-sm);
  overflow: hidden;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#modalAgregarProducto .rc-input-prefix:focus-within {
  border-color: var(--rc-green);
  box-shadow: 0 0 0 3px rgba(86, 171, 47, 0.18);
}

#modalAgregarProducto .rc-input-prefix span {
  display: flex;
  align-items: center;
  padding: 0 0.85rem;
  background: var(--rc-green-soft);
  color: var(--rc-earth);
  font-weight: 700;
  font-size: 1rem;
  border-right: 1.5px solid var(--rc-border);
  white-space: nowrap;
  user-select: none;
}

#modalAgregarProducto .rc-input-prefix .form-control {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding-left: 0.85rem;
  flex: 1;
  background: transparent;
}

/* Eliminar flechas del input tipo number */
#modalAgregarProducto #agregarPrecioProducto::-webkit-outer-spin-button,
#modalAgregarProducto #agregarPrecioProducto::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#modalAgregarProducto #agregarPrecioProducto {
  -moz-appearance: textfield;
}

/* ── Galería de imágenes ─────────────────────────── */
#modalAgregarProducto .rc-galeria {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  background: var(--rc-green-soft);
  border: 1.5px dashed var(--rc-border);
  border-radius: var(--rc-radius-sm);
  padding: 0.75rem;
  min-height: 56px;
}

#modalAgregarProducto .rc-galeria:empty::after {
  content: "Sin imágenes cargadas";
  color: var(--rc-gray);
  font-size: 0.85rem;
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.5rem 0;
}

/* Miniatura */
#modalAgregarProducto .rc-thumb {
  position: relative;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

#modalAgregarProducto .rc-thumb.rc-thumb-in {
  opacity: 1;
  transform: scale(1);
}

#modalAgregarProducto .rc-thumb.rc-thumb-out {
  opacity: 0;
  transform: scale(0.8);
}

#modalAgregarProducto .rc-thumb img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--rc-border);
  display: block;
  transition: transform 0.2s, border-color 0.2s;
}

#modalAgregarProducto .rc-thumb img:hover {
  transform: scale(1.05);
  border-color: var(--rc-green);
}

#modalAgregarProducto .rc-thumb-del {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--rc-red);
  border: 2px solid #fff;
  color: #fff;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform 0.15s, background 0.15s;
  padding: 0;
}

#modalAgregarProducto .rc-thumb-del:hover {
  transform: scale(1.15);
  background: #b91c1c;
}

/* Botón añadir imagen */
#modalAgregarProducto .rc-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--rc-green-dark), var(--rc-green));
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: var(--rc-radius-sm);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  font-family: 'DM Sans', sans-serif;
  border: none;
}

#modalAgregarProducto .rc-upload-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* ── Materiales ─────────────────────────────────── */
#modalAgregarProducto .rc-materiales-lista {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#modalAgregarProducto .rc-mat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--rc-earth-soft);
  border: 1.5px solid #e0d4c0;
  border-radius: var(--rc-radius-sm);
  padding: 0.55rem 0.85rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease,
              box-shadow 0.15s, border-color 0.2s;
}

#modalAgregarProducto .rc-mat-item.rc-mat-in {
  opacity: 1;
  transform: translateY(0);
}

#modalAgregarProducto .rc-mat-item.rc-mat-out {
  opacity: 0;
  transform: translateX(20px);
}

#modalAgregarProducto .rc-mat-item.rc-mat-editing {
  border-color: var(--rc-green);
  background: var(--rc-green-soft);
  box-shadow: 0 0 0 3px rgba(86, 171, 47, 0.15);
}

#modalAgregarProducto .rc-mat-item.rc-mat-updated {
  border-color: var(--rc-green);
  animation: rcPulse 0.5s ease;
}

@keyframes rcPulse {
  0%,100% { box-shadow: none; }
  50%     { box-shadow: 0 0 0 4px rgba(86,171,47,0.25); }
}

#modalAgregarProducto .rc-mat-texto {
  font-size: 0.9rem;
  color: var(--rc-earth);
  font-weight: 500;
}

#modalAgregarProducto .rc-mat-acciones {
  display: flex;
  gap: 0.35rem;
}

#modalAgregarProducto .btn-rc-mat-edit {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

#modalAgregarProducto .btn-rc-mat-edit:hover {
  background: #ffc107;
  color: #fff;
}

#modalAgregarProducto .btn-rc-mat-del {
  background: transparent;
  border: 1px solid var(--rc-red);
  color: var(--rc-red);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

#modalAgregarProducto .btn-rc-mat-del:hover {
  background: var(--rc-red);
  color: #fff;
}

/* Row input + botón agregar material */
#modalAgregarProducto .rc-material-row {
  display: flex;
  gap: 0.5rem;
}

#modalAgregarProducto .btn-rc-material {
  background: linear-gradient(135deg, var(--rc-green-dark), var(--rc-green));
  border: none;
  border-radius: var(--rc-radius-sm);
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.6rem 1.1rem;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: opacity 0.2s, transform 0.15s;
  font-family: 'DM Sans', sans-serif;
}

#modalAgregarProducto .btn-rc-material:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* Hint de edición */
#modalAgregarProducto .rc-edit-hint {
  font-size: 0.8rem;
  color: var(--rc-green-dark);
  background: var(--rc-green-soft);
  border-left: 3px solid var(--rc-green);
  border-radius: 0 6px 6px 0;
  padding: 0.35rem 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── Cantidad ────────────────────────────────────── */
#modalAgregarProducto .rc-qty-input {
  max-width: 160px;
}

/* ── FOOTER ─────────────────────────────────────── */
#modalAgregarProducto .modal-footer {
  background: var(--rc-gray-light);
  border-top: 1.5px solid var(--rc-border);
  padding: 1.1rem 2rem;
  border-radius: 0 0 var(--rc-radius) var(--rc-radius);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

#modalAgregarProducto .btn-rc-cancelar {
  background: transparent;
  border: 1.5px solid var(--rc-border);
  color: var(--rc-gray);
  border-radius: var(--rc-radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.2rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  font-family: 'DM Sans', sans-serif;
}

#modalAgregarProducto .btn-rc-cancelar:hover {
  border-color: var(--rc-gray);
  color: var(--rc-dark);
}

#modalAgregarProducto .btn-rc-guardar {
  background: linear-gradient(135deg, var(--rc-green-dark), var(--rc-green));
  border: none;
  border-radius: var(--rc-radius-sm);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.6rem 1.4rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 14px rgba(86, 171, 47, 0.35);
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  font-family: 'DM Sans', sans-serif;
}

#modalAgregarProducto .btn-rc-guardar:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(86, 171, 47, 0.45);
}

/* ── Animación de entrada ────────────────────────── */
#modalAgregarProducto.show .modal-content {
  animation: rcModalIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rcModalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Separadores entre secciones ────────────────── */
#modalAgregarProducto .modal-body .mb-4:not(:last-child) {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rc-border);
}

/* ── Texto muted ─────────────────────────────────── */
#modalAgregarProducto .text-muted {
  font-size: 0.78rem;
  color: var(--rc-gray) !important;
  margin-top: 0.3rem;
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 576px) {
  #modalAgregarProducto .modal-dialog { margin: 0.5rem; }

  #modalAgregarProducto .modal-header,
  #modalAgregarProducto .modal-body,
  #modalAgregarProducto .modal-footer {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  #modalAgregarProducto .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  #modalAgregarProducto .btn-rc-cancelar,
  #modalAgregarProducto .btn-rc-guardar {
    width: 100%;
    justify-content: center;
  }

  #modalAgregarProducto .rc-qty-input { max-width: 100%; }
}

/* ══════════════════════════════════════════════════
   MODAL DETALLE PRODUCTO 
   ══════════════════════════════════════════════════ */

#modalDetalleProducto .modal-dialog {
  max-width: 720px;
  margin: 1.5rem auto;
}

#modalDetalleProducto .modal-content {
  border: none;
  border-radius: 20px;
  background: #fdfaf5;
  box-shadow: 0 25px 60px rgba(30, 42, 24, 0.18);
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
  animation: rcModalIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

/* HEADER */
#modalDetalleProducto .modal-header {
  background:  #f0f7e7;
  padding: 1.6rem 2rem 1.4rem;
  border-bottom: none;
  position: relative;
  overflow: hidden;
}

#modalDetalleProducto .modal-header::before {
  content: "♻";
  font-size: 7rem;
  position: absolute;
  right: -1rem;
  top: -1.5rem;
  opacity: 0.12;
  line-height: 1;
  pointer-events: none;
}

#modalDetalleProducto .modal-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

#modalDetalleProducto .modal-title {
  color: #3d7d20 !important;
  font-family: 'Playfair Display', serif !important;
  font-size: 1.45rem !important;
  font-weight: 700 !important;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#modalDetalleProducto .modal-title::before {
  content: "📦";
  font-size: 1.2rem;
}

#modalDetalleProducto .btn-close {
  background: rgba(255,255,255,0.25) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/0.8em no-repeat;
  border-radius: 50%;
  opacity: 1;
  width: 2rem;
  height: 2rem;
  transition: background-color 0.2s, transform 0.2s;
}

#modalDetalleProducto .btn-close:hover {
  background-color: rgba(255,255,255,0.4);
  transform: rotate(90deg);
}

/* BODY */
#modalDetalleProducto .modal-body {
  padding: 2rem 2rem 1rem;
  background: #fdfaf5;
}

#modalDetalleProducto .modal-body hr {
  border: none;
  border-top: 1px solid #d1e8c2;
  margin: 1.5rem 0;
}

/* Imagen */
#modalDetalleProducto .col-md-5 img {
  border-radius: 14px !important;
  border: 3px solid #e8f5e0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#modalDetalleProducto .col-md-5 img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(86,171,47,0.2);
}

/* Info - Nombre */
#modalDetalleProducto #detalleNombre {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  color: #1e2a18;
  margin-bottom: 0.75rem;
}

/* Info - Precio */
#modalDetalleProducto #detallePrecio {
  font-size: 1.4rem;
  font-weight: 700;
  color: #56ab2f !important;
  background: #e8f5e0;
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 12px;
  margin-bottom: 1.25rem;
}

/* Info - Descripción */
#modalDetalleProducto .modal-body p {
  font-size: 0.92rem;
  color: #3a4d3c;
  line-height: 1.7;
}

#modalDetalleProducto .modal-body p strong {
  font-weight: 600;
  color: #1e2a18;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Info - Stock */
#modalDetalleProducto #detalleStock {
  font-weight: 700;
  color: #3d7d20;
}

/* Info - Vendedor */
#modalDetalleProducto #detalleVendedor {
  font-weight: 600;
  color: #8b6f47;
  background: #f5f0e8;
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
}

/* Materiales */
#modalDetalleProducto h6 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: #1e2a18;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

#modalDetalleProducto h6 i {
  color: #56ab2f;
}

#modalDetalleProducto #detalleMateriales {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#modalDetalleProducto #detalleMateriales li {
  background: #e8f5e0;
  color: #3d7d20;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #d1e8c2;
}

/* FOOTER */
#modalDetalleProducto .modal-footer {
  background: #f3f4f6;
  border-top: 1.5px solid #d1e8c2;
  padding: 1.1rem 2rem;
  border-radius: 0 0 20px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Botón Cerrar */
#modalDetalleProducto .btn-secondary {
  background: transparent;
  border: 1.5px solid #d1e8c2;
  color: #6b7280;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.2rem;
  transition: border-color 0.2s, color 0.2s;
  font-family: 'DM Sans', sans-serif;
}

#modalDetalleProducto .btn-secondary:hover {
  border-color: #6b7280;
  color: #1e2a18;
  background: transparent;
}

/* Botón Comprar */
#modalDetalleProducto .btn-success {
  background: linear-gradient(135deg, #3d7d20, #56ab2f);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.6rem 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 14px rgba(86, 171, 47, 0.35);
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  font-family: 'DM Sans', sans-serif;
}

#modalDetalleProducto .btn-success:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(86, 171, 47, 0.45);
  color: #fff;
}

/* Animación de entrada */
#modalDetalleProducto.show .modal-content {
  animation: rcModalIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rcModalIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive */
@media (max-width: 576px) {
  #modalDetalleProducto .modal-dialog {
    margin: 0.5rem;
  }
  
  #modalDetalleProducto .modal-header,
  #modalDetalleProducto .modal-body,
  #modalDetalleProducto .modal-footer {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  
  #modalDetalleProducto .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }
  
  #modalDetalleProducto .btn-secondary,
  #modalDetalleProducto .btn-success {
    width: 100%;
    justify-content: center;
  }
}
.profile-modal-overlay {
  display: none; /* Se activa con JS */
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 15, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.profile-modal-overlay.open {
  display: flex;
  opacity: 1;
}

.profile-modal-container {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(45, 122, 79, 0.2);
  border-radius: 24px;
  width: 100%;
  max-width: 850px;
  max-height: 90vh;
  box-shadow: 0 25px 80px rgba(10, 45, 25, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-modal-overlay.open .profile-modal-container {
  transform: scale(1);
}

.profile-modal-header {
  padding: 1.25rem 2rem;
  background: var(--green-dark);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(168, 224, 99, 0.2);
}

.profile-modal-header h3 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.profile-modal-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.profile-modal-close:hover {
  color: var(--green-light);
  transform: scale(1.1);
}

.profile-modal-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  background: rgb(226, 249, 223);
}

/* Tabs Nav Lateral */
.profile-tabs-nav {
  width: 250px;
  background: var(--off-white);
  border-right: 1px solid rgba(45, 122, 79, 0.1);
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-tab-btn {
  background: transparent;
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition);
}

.profile-tab-btn:hover {
  background: rgba(45, 122, 79, 0.05);
  color: var(--green-main);
}

.profile-tab-btn.active {
  background: var(--green-main);
  color: white !important;
}

/* Tabs Content */
.profile-tabs-content {
  flex: 1;
  padding: 2.5rem;
  overflow-y: auto;
  background: rgb(224, 240, 225);
}

.profile-tab-panel {
  display: none;
  animation: fadeInPanel 0.3s ease forwards;
}

.profile-tab-panel.active {
  display: block;
}

@keyframes fadeInPanel {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Avatar Upload styling */
.avatar-upload-container {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.avatar-preview-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(29, 74, 49, 0.15);
  border: 3px solid var(--green-pale);
  cursor: pointer;
  flex-shrink: 0;
}

.avatar-preview-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.avatar-preview-wrapper:hover img {
  transform: scale(1.08);
}

.avatar-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 71, 49, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.avatar-preview-wrapper:hover .avatar-hover-overlay {
  opacity: 1;
}

.avatar-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  
}

.avatar-help-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(45, 122, 79, 0.1);
  outline: 8px; 
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
}

.profile-footer-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Dropdown User Option button */

.btn-outline {
  background: var(--green-pale) !important;
  color: var(--green-main) !important;
  border: 2px solid var(--green-main) !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  padding: 0.4rem 1.2rem !important;
  font-size: 0.82rem !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-outline:hover {
  background: var(--green-main) !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(45, 122, 79, 0.25) !important;
}
.btn-outline-danger {
  background: var(--green-pale) !important;
  color: rgb(98, 59, 59) !important;
  border: 2px solid rgb(155, 74, 74) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border-radius: 999px !important;
}
.btn-outline-danger:hover {
  background: rgb(170, 63, 63) !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(155, 74, 74, 0.25) !important;
}
.btn-profile-menu {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-dark);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: 0.3s;
  text-align: left;
}


.btn-profile-menu:hover {
  background: rgba(35, 91, 59, 0.08);
  color: var(--green-main);
}

/* Password strength requirements validation styling */
.password-requirements {
  background: var(--off-white);
  border: 1px solid rgba(45, 122, 79, 0.1);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1.5rem;
}

.password-requirements h6 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.50rem;
  color: var(--text-dark);
}

.password-requirements ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.password-requirements li {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
}

.req-invalid {
  color: #ba4528;
}

.req-valid {
  color: var(--green-main);
}

.req-valid i {
  color: var(--green-main) !important;
}

.req-valid i::before {
  content: "\f058"; /* fontawesome fa-check-circle */
}

/* Danger Zone styling */
.danger-zone-wrapper {
  border: 1px solid #f5c2c2;
  background-color: #fff9f9;
  border-radius: 16px;
  padding: 1.5rem;
}

.danger-zone-header h5 {
  color: #dc2626;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: 'DM Sans', sans-serif;
}

.danger-zone-header p {
  font-size: 0.88rem;
  color: #7f1d1d;
  margin-bottom: 1.25rem;
}

.btn-danger-custom {
  background: #dc2626 !important;
  color: white !important;
  border: none !important;
  border-radius: 999px !important;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-danger-custom:hover {
  background: #b91c1c !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.35);
}

/* Confirm modal styling overlay secondary */
.confirm-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.confirm-modal-overlay.open {
  display: flex;
  opacity: 1;
}

.confirm-modal-container {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 450px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-modal-overlay.open .confirm-modal-container {
  transform: scale(1);
}

.confirm-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff5f5;
}

.confirm-modal-header h4 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #b91c1c;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.confirm-modal-close {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: #7f1d1d;
}

.confirm-modal-body {
  padding: 1.5rem;
}

.confirm-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Toast Elegant styling */
.toast-container-custom {
  position: fixed;
  top: 95px; /* Justo debajo del navbar */
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 350px;
  width: calc(100% - 40px);
}

.toast-custom {
  background: white;
  color: var(--text-dark);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(29, 74, 49, 0.15);
  border-left: 5px solid var(--green-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideInToast 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  position: relative;
  overflow: hidden;
}

@keyframes slideInToast {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-custom.fade-out {
  animation: fadeOutToast 0.3s ease forwards;
}

@keyframes fadeOutToast {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(120%); opacity: 0; }
}

.toast-content-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast-custom.success {
  border-left-color: #2e7d32;
}

.toast-custom.success i {
  color: #2e7d32;
}

.toast-custom.error {
  border-left-color: #c62828;
}

.toast-custom.error i {
  color: #c62828;
}

.toast-custom.warning {
  border-left-color: #f9a825;
}

.toast-custom.warning i {
  color: #f9a825;
}

.toast-close-btn {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

.toast-close-btn:hover {
  color: var(--text-dark);
}

/* RESPONSIVE DESIGN FOR MODAL */
@media (max-width: 768px) {
  .profile-modal-container {
    max-height: 95vh;
  }
  
  .profile-modal-body {
    flex-direction: column;
  }
  
  .profile-tabs-nav {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding: 0.75rem;
    border-right: none;
    border-bottom: 1px solid rgba(45, 122, 79, 0.1);
    gap: 0.5rem;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  
  .profile-tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
  }
  
  .profile-tabs-content {
    padding: 1.5rem;
  }
  
  .avatar-upload-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
}

/* === ESTILOS ADICIONALES PARA AVATAR CON INICIALES Y ROL === */

.navbar-avatar-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(168, 224, 99, 0.5);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.navbar-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.navbar-avatar-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #a8e063, #2d7a4f);
}

.avatar-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, #a8e063, #2d7a4f);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.avatar-preview-wrapper:hover .avatar-initials {
  transform: scale(1.08);
}

.role-badge-container {
  display: flex;
  align-items: center;
  height: 42px;
}

.badge-role-user {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(45, 122, 79, 0.1);
  border: 1.5px solid rgba(45, 122, 79, 0.3);
  color: #2d7a4f;
  transition: all 0.3s ease;
}

.badge-role-user.vendedor {
  background: rgba(247, 151, 30, 0.1) !important;
  border-color: rgba(247, 151, 30, 0.3) !important;
  color: #f7971e !important;
}

/* Modificación para inputs readonly */
.input-custom[readonly]:disabled {
  background-color: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed;
}

/* Animaciones de microinteracciones */
.btn-usuario, .btn-outline, .btn-outline-danger {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline-danger {
  border: 2px solid #dc2626;
  color: #dc2626;
  background: transparent;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-outline-danger:hover {
  background: #dc2626;
  color: white;
}

/* ══════════════════════════════════════════════════
   CARRITO DE COMPRAS
   ══════════════════════════════════════════ */

/* Botón del carrito en navbar */
.btn-carrito {
  background: rgba(168,224,99,0.15);
  border: 1px solid rgba(168,224,99,0.3);
  color: white;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: 0.3s;
  position: relative;
}

.btn-carrito:hover {
  background: rgba(168,224,99,0.25);
}

.carrito-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #e74c3c;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}

/* Modal carrito */
#modalCarrito .modal-dialog {
  max-width: 700px;
}

#modalCarrito .modal-content {
  border: none;
  border-radius: 20px;
  background: #fdfaf5;
  box-shadow: 0 25px 60px rgba(30, 42, 24, 0.18);
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
}

/* Header del modal */
#modalCarrito .modal-header {
  background: linear-gradient(135deg, #3d7d20 0%, #56ab2f 55%, #a8e063 100%);
  padding: 1.4rem 2rem;
  border-bottom: none;
}

#modalCarrito .modal-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

#modalCarrito .modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: white !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#modalCarrito .btn-close {
  background: rgba(255,255,255,0.25) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/0.8em no-repeat;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
}

/* Body */
#modalCarrito .modal-body {
  padding: 1.5rem 2rem;
  background: #fdfaf5;
  max-height: 60vh;
  overflow-y: auto;
}

/* Carrito vacío */
.carrito-vacio {
  color: #6b7280;
}

/* Items del carrito */
.carrito-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  border: 1px solid #e8f5e0;
}

.carrito-item-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #e8f5e0;
}

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

.carrito-item-nombre {
  font-weight: 600;
  color: #1e2a18;
  font-size: 0.95rem;
}

.carrito-item-precio {
  color: #56ab2f;
  font-weight: 600;
  font-size: 0.9rem;
}

.carrito-item-cantidad {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.carrito-item-cantidad button {
  width: 28px;
  height: 28px;
  border: 1px solid #d1e8c2;
  background: #e8f5e0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  color: #3d7d20;
  transition: 0.2s;
}

.carrito-item-cantidad button:hover {
  background: #56ab2f;
  color: white;
}

.carrito-item-cantidad span {
  min-width: 30px;
  text-align: center;
  font-weight: 600;
}

.carrito-item-subtotal {
  font-weight: 700;
  color: #3d7d20;
  min-width: 90px;
  text-align: right;
}

.carrito-itemEliminar {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: 0.2s;
}

.carrito-itemEliminar:hover {
  background: #fee2e2;
}

/* Total */
.carrito-total {
  background: #e8f5e0;
  padding: 1rem;
  border-radius: 12px;
  margin-top: 1rem;
  font-size: 1.1rem;
  color: #3d7d20;
}

#carritoMontoTotal {
  font-size: 1.3rem;
}

/* Footer */
#modalCarrito .modal-footer {
  background: #f3f4f6;
  border-top: 1px solid #d1e8c2;
  padding: 1rem 2rem;
  border-radius: 0 0 20px 20px;
}

/* ══════════════════════════════════════════════════
   MODAL CONFIRMACIÓN
   ══════════════════════════════════════════════════ */

#modalConfirmacion .modal-content {
  border: none;
  border-radius: 20px;
  background: #fdfaf5;
  box-shadow: 0 25px 60px rgba(30, 42, 24, 0.18);
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
}

#modalConfirmacion .modal-header {
  background: linear-gradient(135deg, #3d7d20 0%, #56ab2f 55%, #a8e063 100%);
  padding: 1.4rem 2rem;
  border-bottom: none;
}

#modalConfirmacion .modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: white !important;
}

#modalConfirmacion .btn-close {
  background: rgba(255,255,255,0.25) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/0.8em no-repeat;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
}

#modalConfirmacion .modal-body {
  padding: 2rem;
  background: #fdfaf5;
}

#modalConfirmacion .form-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8b6f47;
}

#modalConfirmacion .form-control {
  border: 1.5px solid #d1e8c2;
  border-radius: 12px;
  padding: 0.65rem 1rem;
  background: white;
  font-family: 'DM Sans', sans-serif;
}

#modalConfirmacion .form-control:focus {
  border-color: #56ab2f;
  box-shadow: 0 0 0 3px rgba(86,171,47,0.18);
}

.confirmacion-total {
  background: linear-gradient(135deg, #3d7d20, #56ab2f);
  color: white;
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
}

#modalConfirmacion .modal-footer {
  background: #f3f4f6;
  border-top: 1px solid #d1e8c2;
  padding: 1rem 2rem;
}

/* Items en confirmación */
.confirmacion-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem;
  background: white;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  border: 1px solid #e8f5e0;
}

.confirmacion-item span:first-child {
  color: #1e2a18;
}

.confirmacion-item span:last-child {
  font-weight: 600;
  color: #56ab2f;
}

/* TOAST ÉXITO */
.toast-exito {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #3d7d20, #56ab2f);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  transform: translateY(100px);
  opacity: 0;
  transition: 0.3s ease;
  z-index: 9999;
}

.toast-exito.show {
  transform: translateY(0);
  opacity: 1;
}

  /* Botón agregar carrito en tarjeta */
.btn-agregar-carrito {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #56ab2f, #a8e063);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 3px 10px rgba(86,171,47,0.25);
}

.btn-agregar-carrito:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Toast */
.toast-carrito {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #3d7d20, #56ab2f);
  color: white;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateY(100px);
  opacity: 0;
  transition: 0.3s ease;
  z-index: 9999;
}

.toast-carrito.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-carrito-error {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}