BODY { background-color:#DAF7A6;
       text-align:center;
     }

P {color:blue; 
   font-size:20px;
   font-family:Courier;
   font-weight:bold;
   line-height:30px;
   letter-spacing:5px;
   text-transform:capitalize;
   text-align:center;
   text-indent:30px;
  }

H1 { background: #DAF7A6;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
}

H2 { background: #DAF7A6; }

a {
    background-color: rgb(6, 191, 40);
}

.checkbox
{
    background-color: #d9534f; 
    color: white; 
    padding: 12px 24px; 
    border: none; 
    border-radius: 5px; 
    font-size: 1em; 
    font-weight: bold; 
    cursor: pointer; 
    transition: background 0.3s;
    margin-top: 20px;
}

.checkbox:hover
{
    background-color: #c9302c; 
}

.checkbox:disabled
{ 
    background-color: #ccc; 
    cursor: not-allowed;
}

.checkbox-col
{
    display: flex;
    justify-content: center;
    align-items: center;
}

.contenedor-graficos {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    padding: 20px;
}

.grafico-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 20px;
    width: 45%;
    min-width: 400px;
    height: 450px;    
    overflow: hidden; /* ← AGREGAR ESTA LÍNEA */
    box-sizing: border-box; /* ← Y ESTA TAMBIÉN */
}

input[type="checkbox"]
{
    width: 18px; 
    height: 18px; 
    cursor: pointer; 
}

.menu-divider 
{
    height: 1px;
    background-color: #b92626;
    margin: 1px 1px;
    list-style: none;
    padding: 0;
}

.pure-table
{
    border-collapse:separate;
    border-spacing:0;
    empty-cells:show;
    border:1px solid #cbcbcb
}

.pure-table td,.pure-table th 
{
    border-left:1px solid #cbcbcb;
    border-width:0 0 0 1px;
    font-size:inherit;
    margin:0;
    overflow:visible;
    padding:.5em 1em;
    background-color: rgb(105, 143, 233);
}

.pure-table td
{ 
    background-color: transparent; 
}

.login-container {
    padding: 1.5em;
    text-align: center;
}

.login-container img {
    max-width: 300px;
    height: auto;
    margin-bottom: 1em;
}

.login-container h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #333;
}

.login-form {
    max-width: 350px;
    margin: 2em auto;
    text-align: left;
}

.login-form fieldset {
    border: none;
    padding: 0;
}

.login-form label {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5em;
    display: block;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    border-radius: 6px;
    margin-bottom: 1.5em;
    width: 100%;
    box-sizing: border-box;
}

.login-form button {
    border-radius: 6px;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    padding: 0.8em;
    background-color: #0078e7;
    border: none;
    color: #fff;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-form button:hover {
    background-color: #005bb5;
}
.login-container {
    padding: 1.5em;
    text-align: center;
}

.login-container img {
    max-width: 300px;
    height: auto;
    margin-bottom: 1em;
}

.login-container h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #333;
}

.login-form {
    max-width: 350px;
    margin: 2em auto;
    text-align: left;
}

.login-form fieldset {
    border: none;
    padding: 0;
}

.login-form label {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5em;
    display: block;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    border-radius: 6px;
    margin-bottom: 1.5em;
    width: 100%;
    box-sizing: border-box;
}

.login-form button {
    border-radius: 6px;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    padding: 0.8em;
    background-color: #0078e7;
    border: none;
    color: #fff;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-form button:hover {
    background-color: #005bb5;
}

.nombre-cliente {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #2c3e50;
}

/* Padre */
.micontenedor {
display: grid;
/*crear 3 columnas*/
grid-template-columns: 1fr 1fr 1fr; /*fr=frame=marco, rectangulo, template=plantilla*/
/*crear 2 filas*/
grid-template-rows: 150px 220px; /*primer fila alto 120, segunda 180*/
gap: 5px; /*gap es brecha, separacion entre frames*/
font-weight: 700;
}
/* nth=umpteehnth=enésimo, n, posicion n*/

/* Hijo 1 */
.micontenedor >div:nth-child(1) {
background-color: rgb(161, 89, 145);
color: rgb(0, 0, 0);
border: 1px solid #ddd;
border-radius: 12px;         /* Bordes suaves */
padding: 18px;
margin: 8px;
border: 2px solid #000;
}
/* Hijo 2 */
.micontenedor >div:nth-child(2) {
background-color: coral;
color: rgb(0, 0, 1);
border-radius: 12px; 
padding: 18px;
margin: 8px;
border: 2px solid #000;
display: flex;
align-items: center;
flex-direction: column;
text-align: center;
justify-content: center;
}
/* Hijo 3 */
.micontenedor >div:nth-child(3) {
background-color: rgb(231, 70, 70);
color: rgb(0, 0, 0);
border-radius: 12px;
padding: 18px;
margin: 8px;
border: 2px solid #000;
display: flex;
align-items: center;
flex-direction: column;
text-align: center;
justify-content: center;
}
/* Hijo 4 */
.micontenedor >div:nth-child(4) {
background-color: rgb(237, 245, 126);
color: rgb(0, 0, 0);
border-radius: 12px;
padding: 18px;
margin: 8px;
border: 2px solid #000;
}
/* Hijo 5 */
.micontenedor >div:nth-child(5) {
background-color: rgb(144, 146, 238);
color: rgb(0, 0, 0);
border-radius: 12px;
padding: 18px;
margin: 8px;
border: 2px solid #000;
display: flex;
align-items: center;
flex-direction: column;
text-align: center;
justify-content: center;
}
/* Hijo 6 */
.micontenedor >div:nth-child(6) {
background-color: lightgreen;
color: rgb(0, 0, 0);
border-radius: 12px;
padding: 18px;
margin: 8px;
border: 2px solid #000;
display: flex;
align-items: center;
flex-direction: column;
text-align: center;
justify-content: center;
}
.micontenedor >div:nth-child(7) {
grid-column: 1 / -1;
background-color: rgb(193, 246, 86);
color: rgb(0, 0, 0);
border-radius: 12px;
padding: 18px;
margin: 8px;
border: 2px solid #000;
display: flex;
align-items: center;
flex-direction: column;
text-align: center;
justify-content: center;
}
.texto {
  flex: 1; /*hace que el texto ocupe todo el espacio disponible*/
}

.micontenedor2 {
 display: grid;
 grid-template-columns: 1fr 1fr 1fr;
 grid-template-rows: 120px; 
 gap: 10px; 
}

.micontenedor2 div:nth-child(odd){  /*impares*/
background-color: #EEEEEE;
padding: 10px;
}

.micontenedor2 div:nth-child(even){  /*pares*/
background-color: #CCCCCC;
padding: 5px;
}
.menu-item-right {
    margin-left: auto; 
}

/* Estilo del botón de Login */
.btn-login {
    background-color: rgb(73, 174, 73);       /* Azul corporativo */
    color: #000000 !important;       /* Texto blanco (forzado para sobrescribir PureCSS) */
    border-radius: 6px;              /* Bordes ligeramente redondeados */
    padding: 0.5em 1.2em !important; /* Tamaño de botón */
    font-weight: 600;                /* Texto en negrita */
    font-size: 0.95em;
    transition: all 0.3s ease;       /* Transición suave */
    box-shadow: 0 2px 4px rgba(0, 120, 231, 0.2);
}

/* Efecto al pasar el mouse por encima */
.btn-login:hover {
    background-color: rgb(73, 174, 73);
    color:  #080606!important;
    transform: translateY(-2px);     /* Se eleva ligeramente */
    box-shadow: 0 4px 8px rgb(73, 174, 73);
}
.pure-menu-item a:hover {
    background-color: rgb(73, 174, 73);
    color:  #080606!important;
    transform: translateY(-2px);     /* Se eleva ligeramente */
    box-shadow: 0 4px 8px rgb(73, 174, 73);
}

.titulo-principal {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    margin-top: 30px;
    color: #333;
}

.titulo-grafico {
    text-align: center;
    font-family: 'Sora', sans-serif;
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.seleccion-info 
{
    text-align: center;
    margin: 15px 0; 
    font-family: 'Sora', sans-serif;
    color: #555;
}
/* Ajuste para móviles (opcional, por si el menú se colapsa) */
@media (max-width: 768px) {
    .menu-item-right {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* ==========================================
   EFECTO HOVER EN IMÁGENES DE PRODUCTOS
   ========================================== */
.img-producto-wrapper {
    position: relative;
    display: inline-block;
    overflow: visible; /* Permite que la imagen se salga de la celda al agrandarse */
}

.img-producto {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.img-producto:hover {
    transform: scale(3); /* Agranda 3 veces el tamaño original */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); /* Sombra para dar profundidad */
    z-index: 100; /* Asegura que quede por encima de las demás filas */
    position: relative;
    border: 2px solid #5ab3cf; /* Borde azul corporativo al hacer hover */
}

/* ==========================================
   TARJETAS DE PRODUCTOS (compras.php)
   Estilo tipo MercadoLibre
   ========================================== */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.producto-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
}

.producto-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.producto-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.producto-card-body {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.producto-card-titulo {
    font-family: 'Sora', sans-serif;
    font-size: 0.95em;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.3;
    min-height: 40px;
}

.producto-card-categoria {
    display: inline-block;
    background: #e9ecef;
    color: #666;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.producto-card-precio {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6em;
    font-weight: 700;
    color: #333;
    margin: 10px 0;
}

.producto-card-stock {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 12px;
}

.producto-card-stock.agotado {
    color: #d9534f;
    font-weight: bold;
}

.producto-card-stock.disponible {
    color: #28a745;
}

.producto-card-botones {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.btn-comprar, .btn-agregar-carrito {
    flex: 1;
    padding: 10px 8px;
    border: none;
    border-radius: 5px;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-comprar {
    background: #3483fa;
    color: white;
}

.btn-comprar:hover {
    background: #2968c8;
}

.btn-agregar-carrito {
    background: #fff;
    color: #3483fa;
    border: 1px solid #3483fa;
}

.btn-agregar-carrito:hover {
    background: #f0f6ff;
}

.btn-comprar:disabled, .btn-agregar-carrito:disabled {
    background: #ccc;
    color: #666;
    border-color: #ccc;
    cursor: not-allowed;
}

/* Contador del carrito en el menú */
.carrito-badge {
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 0.8em;
    margin-left: 5px;
}

/* Filtro de categorías en compras */
.filtro-categorias-compras {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 1400px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filtro-categorias-compras a {
    padding: 8px 16px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 20px;
    font-family: 'Sora', sans-serif;
    font-size: 0.9em;
    transition: all 0.2s;
}

.filtro-categorias-compras a:hover,
.filtro-categorias-compras a.activo {
    background: #3483fa;
    color: white;
}

/* Carrito de compras (ventas.php) */
.carrito-container {
    max-width: 1000px;
    margin: 20px auto;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.carrito-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    gap: 15px;
}

.carrito-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.carrito-item-info {
    flex: 1;
}

.carrito-item-precio {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.1em;
    color: #333;
}

.carrito-item-cantidad {
    display: flex;
    align-items: center;
    gap: 8px;
}

.carrito-item-cantidad input {
    width: 60px;
    padding: 5px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn-quitar {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
}

.btn-quitar:hover {
    background: #c0392b;
}

.carrito-total {
    text-align: right;
    padding: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.5em;
    font-weight: 700;
    color: #333;
    border-top: 2px solid #3483fa;
    margin-top: 10px;
}

.carrito-acciones {
    text-align: center;
    padding: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-finalizar {
    background: #28a745;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-finalizar:hover {
    background: #218838;
}

.btn-volver-compras {
    background: #6c757d;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-volver-compras:hover {
    background: #5a6268;
    color: white;
}

/* ==========================================
   PÁGINA DE AGRADECIMIENTO (gracias.php)
   ========================================== */
.gracias-container {
    max-width: 600px;
    margin: 50px auto;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* Anular el H1 global (fondo verde #DAF7A6) */
.gracias-container h1 {
    color: #28a745;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 20px;
    background: none;
    border: none;
}

/* Anular el P global (azul, letter-spacing, text-indent) */
.gracias-container p {
    color: #666;
    font-size: 1em;
    font-family: 'Sora', sans-serif;
    letter-spacing: normal;
    text-indent: 0;
    text-transform: none;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Resaltar el nombre del cliente */
.gracias-container p strong {
    color: #333;
    font-size: 1.2em;
}

/* Anular el <a> global (fondo verde) y dar look de botón */
.gracias-container a {
    background-color: #3483fa;
    color: white;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    margin-top: 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: background 0.3s;
}

.gracias-container a:hover {
    background-color: #2968c8;
    transform: none;
    box-shadow: none;
}

/* Icono de check */
.gracias-container .check-icon {
    font-size: 4em;
    color: #28a745;
    margin-bottom: 20px;
}

/* Ocultar/limitar cualquier imagen que se cuele (la silueta negra) */
.gracias-container img {
    max-width: 100px;
    height: auto;
    margin: 0 auto 20px auto;
    display: block;
}

/* ==========================================
   DESACTIVAR HOVER EN TARJETAS DE COMPRAS
   ========================================== */
.producto-card .img-producto-wrapper {
    overflow: hidden !important;
    display: block !important;
}

.producto-card .img-producto {
    transition: none !important;
    cursor: default !important;
}

.producto-card .img-producto:hover {
    transform: none !important;
    box-shadow: none !important;
    z-index: auto !important;
    border: 1px solid #ddd !important;
    position: static !important;
}