/* style.css */

/* --- Estilos Generales --- */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
    color: #333;
    touch-action: manipulation; 
}

header {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px 0;
}

h1 { margin: 0; font-size: 2rem; }

/* --- Pestañas (Tabs) --- */
.tabs {
    display: flex;
    background-color: #ecf0f1;
    border-bottom: 4px solid #bdc3c7;
    position: sticky; top: 0; z-index: 10; /* Pegajoso al hacer scroll */
}

.tab-btn {
    flex: 1;
    padding: 20px 10px;
    border: none;
    background: #ecf0f1;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    color: #7f8c8d;
}

.tab-btn.active {
    background-color: #fff;
    color: #2c3e50;
    border-bottom: 5px solid #27ae60;
}

/* --- Contenido --- */
.content { display: none; padding: 15px; padding-bottom: 80px;}
.content.active { display: block; }

/* --- Buscador --- */
.search-container input, .input-grande {
    width: 100%;
    padding: 15px;
    font-size: 1.3rem;
    border: 3px solid #bdc3c7;
    border-radius: 10px;
    box-sizing: border-box;
    margin-bottom: 15px;
}

/* --- Tarjetas --- */
.card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 8px solid #3498db;
}

.card.poca-existencia {
    border-left: 8px solid #e74c3c;
    background-color: #fff5f5;
}

.producto-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.nombre-prod {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0;
    width: 65%;
    line-height: 1.2;
}

.precio-prod {
    font-size: 1.5rem;
    color: #27ae60;
    font-weight: bold;
}

/* --- Botones Grandes --- */
.btn-vender, .btn-guardar, .btn-pdf, .btn-secundario, .btn-peligro, .btn-editar {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-vender { background-color: #27ae60; }
.btn-guardar { background-color: #2980b9; }
.btn-pdf { background-color: #e67e22; }
.btn-secundario { background-color: #7f8c8d; }
.btn-peligro { background-color: #c0392b; }
.btn-editar { background-color: #8e44ad; width: auto; padding: 10px 20px;} /* Botón morado editar */

/* --- Controles de Stock (Inventario) --- */
.admin-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f0f2f5;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
}

.stock-control-btn {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    font-weight: bold;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: white;
}

.btn-menos { background-color: #e74c3c; }
.btn-mas { background-color: #27ae60; }
.stock-display { font-size: 1.5rem; font-weight: bold; color: #333; }

/* --- Modal (Ventana Emergente) --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 100; 
    left: 0; top: 0;
    width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.6); /* Fondo oscuro */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 85%;
    border-radius: 15px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

label { font-weight: bold; display: block; margin-top: 10px;}